Hello!
I’m developing an Italian Poker game in Java3D.
I’m new in Java2 and Java3D programming and I’m experiencing problems with memory.
In the game I build a SimpleUniverse with several BranchGroups which can be detached at runtime, each containing a lot of TransformGroups.
There’s also a dedicated BranchGroup for Behaviors.
Each detached Branchgroup is eliminated immediately, calling the gc.
myDetachedBG = null;
System.runFinalization();
System.gc();
At the end of the game, I call
mySimpleUniverse.removeAllLocales();
System.runFinalization();
System.gc();
to free memory and start a new game.
Unfortunately only a small amount of memory is collected, and when I start the game again it begins to grow.
I don’t think it’s a problem of circular reference.
Can you help me?
Thanx and excuse me if my English is not so good.
Giuseppe