I've been having alot of trouble with making my code memory efficient. I
have a "Main World" and load other "worlds" off of it. If I go through
all four of these "worlds" in one execution of my program I run out of
memory. I detach a main BranchGroup that contains each of these worlds,
so only one world is active at a time. After detaching a world I set
it's BranchGroup to null. first question: is this the correct way to
dispose of a BranchGroup?
Also, I've been looking to stream line my code and I found something a
bit disturbing. By creating an empty BranchGroup 261,320 bytes of memory
are used. I got this using the following code:
long a = ApplicationEnvironment.rt.totalMemory() -
ApplicationEnvironment.rt.freeMemory();
BranchGroup scott = new BranchGroup();
System.out.println ("BranchGroup Memory Used: " +
((ApplicationEnvironment.rt.totalMemory() -
ApplicationEnvironment.rt.freeMemory())
- a));
Does it seem reasonable that a BranchGroup would require that much
memory? Is there any way to reduce this usage?
Any help, suggestions, or comments would be greatly appreciated.
Scott A. Vander Weide
SAIC - Celebration, FL
phone:(321) 939-7908
email:[EMAIL PROTECTED]
===========================================================================
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".