White Morph wrote:

Hi Kelvin,

I added the following statements in deleteButtonActionPerformed() function
after the line of "com.sun.j3d.utils.universe.Viewer.clearViewerMap();" :
       BranchGroup emptyGroup = new BranchGroup();
       emptyGroup.setCapability(BranchGroup.ALLOW_DETACH);
       universe.getLocale().addBranchGraph(emptyGroup);
       universe.getLocale().removeBranchGraph(emptyGroup);
       emptyGroup = null;

I tested it again. Compared to the last run, it does release some memory by
collecting the "Appearance and Sphere" objects, but all the Material objects
created when I add the Spheres are not collected, and there is a reference
graph like:
   Canvas3D---...----MaterialRetained---Material

In my program, the Material object is only referred by Appearance object.
If the Appearance object is released, I suppose the Material object should
be also released, but it's not. Is this also a memory leak???

Thanks, ---white




Yes, it is a memory leak. I just update bug 4884065 for this one.

Thanks.

- Kelvin
-----------
Java 3D Team
Sun Microsystems Inc.

===========================================================================
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".

Reply via email to