Hi ,
 
I will explain my program first.
 
I am having one MainBranchGroup.
 
I am having one createSceneGraph() Method which will return BranchGroup Object.
 
I am adding like this
 
   mainBranchGroup.add(createSceneGraph());
 
 
My application is having  3D Bars, the length, width and height for the Bars will come from the model.
 
My createSceneGraph() method will read the model and it will show the Graphics.
 
 
i have one method called refresh
 

public void refresh()

{

  mainBranchGroup.removeChild(0);

  objRoot= null;

  objRotate= null;

  mainBranchGroup.addChild(createSceneGraph(canvas3D));

}

This is my refresh method. When ever the change in model occurs i will call the refresh method.

which will remove the 0th element and it will add again another branchgroup.

 

/////******  The problem is if i do some user interaction for some 10 times ( ie if i call refresh( ) method 10 times )

it is showing " OutOfMemoryException ".

 

Anybody is having any idea about this.

Please help me.

Karthikeyan

Reply via email to