public class DestructorThread
extends java.lang.Object
An object which needs to be destructed should create a static subclass of DestructorThread.Destructor
.
Once the referent object is garbage collected, the DestructorThread will callback to the DestructorThread.Destructor.destruct()
method.
The underlying thread in DestructorThread starts when the first Destructor is constructed and then runs indefinitely.
Modifier and Type | Class and Description |
---|---|
static class |
DestructorThread.Destructor
N.B The Destructor SHOULD NOT refer back to its referent object either explicitly or
implicitly (for example, as a non-static inner class).
|
Constructor and Description |
---|
DestructorThread() |