Dispose of any behind the scenes resources this entire Applet is using (e.g. inside the native GUI (Graphic User Interface) ). This does not delete the current application object, but it does dispose of all the children. This is required because the AWT (Advanced Windowing Toolkit) garbage collection scheme only can work on its own objects, not those inside the native GUI.
After calling destroy, an Applet/JApplet object will never be reused. The Applet object as a whole will soon after be discarded. It is not clear just what you need to dispose of to ensure that discarding the Applet object suffices. Do you need to nullify the references to your Components? Do you need to remove your Listeners? Do you need to remove your Components from the contentPane? I think some experiments with a profiler would be needed to answer those questions definitively.
Oddly sometimes the entire Applet class will be reloaded and the static inits redone after a destroy.
This page is posted
Optional Replicator mirror
Please read the feedback from other visitors, or send your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
Your face IP:[18.104.22.168]
You are visitor number|