Hi,
I am trying to display different 3D scenes frequently in an application.
To increase
efficiency of the whole application and reduce memory requirements, the
scene must deallocate memory when it is not shown.
For me, it is very important to minimize memory usage because I want to
import
several vrml-Files including enormous geometry.

To free memory I do the following:
        Canvas3D.stopRenderer();
        Canvas3D.setEnabled(false);   // maybe redundant
        View.stopBehaviorScheduler(); // maybe redundant
        View.stopView();
        View.removeCanvas3D(Canvas3D);
        Locale.removeBranchGroup(BranchGroup);
        BranchGroup = null;
        (non-simple!) VirtualUniverse.removeAllLocales();
        Locale = null;
        VirtualUniverse = null;
        ViewPlatform = null;
        View = null;
        Canvas3D = null;

Additionally, garbage collection is invoked, too.
But this do not reduce memory at all!

Reaching the maximum size of memory reserved for my Java-Application the
following
exception occures while loading using VrmlLoader:

        Exception occurred during event dispatching:
        java.lang.OutOfMemoryError
                <<no stack trace available>>

Does anyone know how to handle it?

Regards,
  Marc

===========================================================================
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".

Reply via email to