I don't have a lot of knowledge about Java3D. I have been tasked to fix memory problems with three applications which each create a SimpleUniverse to display. Each one functions as it should and when I close the application, the cleanup() (I am running Java3D 1.3.1) method on my SimpleUniverse gets called. I have verified this for each of my applications using OptimizeIt to see that the SimpleUniverse is garbage collected.
My problem arises when I run more than one of these applications or multiple instances of one application at a time. When I do this and then close each instance, the SimpleUniverse it created does not get released for collection. In fact, the only way any SimpleUniverse (SU) is collected is to close all of the instances but even then only one of the instances is eligible for garbage collection. I am running these applications from a launcher Java app so that is how I am able to see the state after all have been closed. I have noticed the following behavior as well. The given numbers vary from run to run, these are numbers produced by a single run-through. Create one instance: SU 1 references 5734K of memory. Create a second instance (keeping the first but doing nothing else with it): SU 1 references 9950K SU 2 references 9950K Create a third, doing nothing else with the other two: SU 1 references 13Mb SU 2 references 13Mb SU 3 references 13Mb Now, when I close two of them, nothing happens to the memory referenced by these instances. I print a message after SimpleUniverse.cleanup() has been run to verify that it occurred. When I close the third instance, a single SU is released to garbase collection and the remaining instances both reference ~9980K of memory. I am aware of the fact that Java3D attempts to reduce memory consumption by sharing objects in memory so in the back of my mind I wonder if that could be a contributor to this problem. However, if that were the case, then I would expect that each SU would be release its at least some of its memory when its corresponding application is closed. As it is, the only way to release this memory is to shut down the entire launcher application. Does anybody have any ideas/suggestions for tracking down what is happening here? Again, each of these applications cleans up nicely when run one at a time, it's just when they run at the same time that memory does not get released. =========================================================================== 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".