-----Ursprüngliche Nachricht----- Von: Kelvin Chung [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 14. Januar 2003 23:04 An: [EMAIL PROTECTED] Betreff: Re: [JAVA3D] Java3D Memory Leaks
> It is a bug if the BranchGroup remove but Node such as Shape3D under it > is still reference by Java3D. > However if user program has a reference to Node then the NodeRetained > reference will not free. > > We've done lots of work to reclaim the memory use by remove BranchGroup. > However there may be > case that we are still missing. Currently we're looking at > > bug 4794994 - Memory leak when SharedGroup removed > On the JDK side, there is a bug about applet > 4766280 -Memory leak when reloading applet I'm also seing memory leaks, and I don't know if it's in my program on j3d. I'm not using SharedGroups nor applets, ImageComponents or textures. Pure geometry. I also don't keep references of any node, BUT I do cache geometries and appearances. And I am also attaching to the nodes user data, which may be referenced from other places of the application. Can caching of geometries, appearances and user data objects keep the whole branch goup in memory ??? > some memory leak bug address in J3D v1.3.1beta1 are: > 4742720 - Memory leak when non-byRef ImageComponent is used for Raster > 4748837 - Memory leak when new texture is set in Appearance > > > Note that it is user program responsiblity not to reference any Node in > the subtree that is remove. A single > Shape3D cache by user program may cause a bundle of scenegraph nodes not > able to GC. Some other common > error is user application (or AWT/Swing) has reference to Canvas3D or > View so the whole scenegraph is not > GC. A new method cleanup() is added in SimpleUnivesrse to help this: My app loads different files to view and / or edit. I'm having a single Canvas3D and a single View for the whole lifetime of the application, so it makes sense not to free them and recreate each time I'm loading a new file. However, with each object loaded, the memory usage increases, just like if the old object, which is nowhere referenced, is not gc-ed. Also, depending of the complexity of the model (I mean really complex!), I noticed that detaching the branch group from the locales may take a significant amount of time, up to 5 minutes, sometimes more than the time needed to assembly the model. Cheers, Florin ==========================================================================To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".