From: Pepijn V. E. <pep...@lu...> - 2002-02-08 07:26:14
|
The problem with the current version of the tesselator isn't a memory leak, but a memory corruption problem. In short, if a gc occurs during the tesselation of an object (ie while you're calling gluTessVertex) there is a possibility that the vertex data is corrupted. This is due to the way the passed vertex data is locked and released in the native library. If written a fix for this, that automatically releases any allocated memory at the right time, but this hasn't been included in gl4java yet (at least I don't think so). More detailed explanations can be found in the mailinglist archive. Pepijn Van Eeckhoudt Mark Montana wrote: > Does the GL4Java glu tesselator have a memory leak currently? I know that the Magician > API had a release() method for their tesselator for releasing internal memory allocated > by the tesselator, but I did not see such a method here. > > In fact, we forgot to call the release() method in our app, and we had a nasty leak that > took us a while to track down. In fact, we were in danger of losing one of our customers > over it. > > I am very curious about what arrays the GL4Java tesselator is allocating (vertex > arrays?) and if it is freeing that memory. One of our graphical objects is tesselated > every frame (because it changes too frequently to bother with display listing), and that > becomes a nasty problem for us if the tesselator has a leak. Can anyone shed some light > for me? > > thanks, > mark > > Pepijn Van Eeckhoudt wrote: > > >>I wrote a simple memory management module that keeps track of the >>alocated arrays, so they can be released at a later point. I've tested >>this idea with the tesselation stuff, and it works fine. >>I've made these changes to the C files in the CNativeCode directory, >>which isn't ideal (should be autogenerated). Could someone explain to me >>where I can put my implementations of the >>Java_gl4java_GLUFunc14JauJNI_gluTessVertex__* functions, so they would >>appear in the generated c files automatically. >> >>thanks, >>Pepijn Van Eeckhoudt >> > > > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > > |