Hi Saurabh,
i just had a look at my shape3dretained instances. They are dropping to zero
once i terminated my application.
I introduced a ShapeManager which handles all Shape3D objects in my app. this
manager is also responsible for
freeing the shapes properly. currently i use this approach for each shape
cleanup:
Shape3D shape = ... the shape to be destroyed
int index = 0;
while ( index < shape.numGeometries() ) {
try {
// remove all elements of the geometry
shape.removeGeometry( index );
}
catch ( CapabilityNotSetException e ) {
// set the appropriate capability while setting up the shape, if this
throws an expection
e.printStackTrace();
// skip this one
index++;
}
}
// set all elements of the shape to null
try {
shape.setAppearance( null );
}
catch ( CapabilityNotSetException e ) {
e.printStackTrace();
}
// finally clear object reference from shape
shape.setUserData( null );
// remove shape from the stack
shape = null;
Try this and (please) tell me if it worked.
Cheers,
Karsten
Saurabh Akhauri wrote:
> hi
> I am facing problems in deallocating the memory
> used by scene graph because the shape3d object's
> reference count never becomes zero, the profiler shows
> that Shape3dRetained class holds its reference
>
> 1. Can someone help me with some details on
> Shape3DRetained class ,
>
> 2. pls help me with some tips on de-allocating memory occupied
> by scenegraph
>
> thanks in adv
>
> saurabh
>
> ===========================================================================
> 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".
===========================================================================
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".