destroy : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

destroy

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
on the web at:

http://mindprod.com/jgloss/destroy.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\destroy.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.118.138.213]
You are visitor number