Sorry for the unclear formulation. Well I am running an Eclipse RCP application. In RCP Applications the docking windows or tabs you see are either Views or Editors. So when I close the View that has inside of it's composite a jReality frame with an viewerApp and even when I call viewerApp.dispose() in my ViewPart dispose() I still end up loosing 10-15MByte each time I open the View again and close it even if the viewerApp just contains some empty SceneGraphComponent nodes when the underlying viewer is softviewer. I managed to cut it down to ~1.5MByte by doing some of the things Joe suggested. I am using the
prepareMemoryCleanUp(SceneGraphComponent sceneGraphComponent) and it's cleanUp viewer code as well.
I think I can probably live with that for the moment.
Problems with releasing memory
Re: Problems with releasing memory
Instead of this prepareMemoryCleanup i suggest you add to the ViewerApp.dispose method. Maybe you have to wrap the v.set... calls into a try-catch block.
Code: Select all
for (Viewer v : viewers) {
v.setSceneRoot(null);
v.setCameraPath(null);
v.setAuxiliaryRoot(null);
}
viewers=null;
Re: Problems with releasing memory
Thanks Steffen, that has the same effect.