Some objects in the AWT system need to finalize free resources. The most striking example is java.awt.Windows , which must recycle its own resources after the window is garbage collected.
One could do this with the help of finalizers, but the solution that gives you more granular control is to use phantom links with a link queue. This solution requires a dedicated thread that waits for a link queue. This stream is the Java 2D disposer stream that is created when the AWT system is initialized.
Ingo kegel
source share