Hi Karsten,
Did you add the method destroy()
in your applet to do the cleanup by
calling VirtualUniverse removeAllLocales() ?
This should clean up all the Java3D thread and
release memory before the applet exit.
public class Test extends Applet {
VirtualUniverse u;
....
public void destroy() {
u.removeAllLocales();
}
}
Please refer to the example under
examples/HelloUniverse/HelloUniverse.html
Thanks.
- Kelvin
----------
Java 3D Team
Sun Microsystems Inc.
>X-Unix-From: [EMAIL PROTECTED] Thu Mar 29 07:26:04 2001
>X-Accept-Language: en
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>Date: Thu, 29 Mar 2001 16:33:25 +0200
>From: Karsten Fries <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Memory issue!!
>To: [EMAIL PROTECTED]
>
>Hi there,
>
>i'm back again, tracking my memory consumption. I realized that i was unable to
>get my
>Canvas3D finalized. Since it occupies around 4 MB in the VM i had the idea of
>recycling it.
>
>This is very crucial for my application, since it is enbeded in an applet in
>some browser.
>Clicking reload 10 times would result in a loss of memory of 40MB (not so nice).
>
>Finally my applet can be reloaded as offen as i want without messing up memory.
>At least,
>not the VM heap memory. It uses around 9 MB while the heapsize is 30MB,
>constantly.
>
>But when tracking the browsers memory usage. I still realize a increasing
>allocated memory size
>every reload ( of around 3MB ~ the size of my scene, i presume ).
>At first sight i was afraid the native code produces some leaks. But sometime
>the VM
>increased heapsize by 10MB and decreased it by 10MB again, shortly afterwards.
>The result was that my netscape memory usage increased by 10MB and never went
>down again.
>
>My conclusion is:
>Every time the VM allocated additional memory the application memory increases.
>When the VM releases memory the browser ignores it; resulting in a memory leak.
>
>Has anybody any clue concerning this!!!
>Any comment appreciated.
>
>I can reproduce this without the use of any browser using the appletviewer of my
>jbuilder.
>I try to cleanup everything when a stop applet occurs, and recreate the view
>when start applet
>is invoked.
>
>
>Cheers,
>Karsten
>
>===========================================================================
>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".
===========================================================================
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".