From: Kerstin M. <km...@gm...> - 2005-03-03 21:15:26
|
hello, i'm trying to write a gl4java program that works with matlab. the application runs (with GlAnimCanvas in a Frame), but i have some problems with closing them. when i click the cross (or ALT+F4) an error message occurs: "gljDestroy failed (free)". i read the forum and there they said i should stop the canvas (animcanvas.stop()) and i should animcanvas.destroy() but it won't work. the curious is, when i DON'T add any windowlistener to the frame and i click the cross, then the error message appears anyway and the canvas kind of destroy themself but the frame is still open. normally nothing should happen, because i didn't add some eventlistener. apart from that. i think something is left in the memory. when i start the application with matlab by calling the constructor of the class (its very easy to work with the combination matlab and java) and close them and start them again and again. after the 3th or 4th time running the program, the animation gets slower and slower and finally perhaps after the 5th time starting it. matlab and the javaapplication crashes. so i thougth, i could use a destructor that free the memory especially the opengl things. how can i do that? thanks for trying to understand my english :-) i hope you can help me kmathaj |