|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Destroyable interface marks an object that has a "destructor" method.
In reality, implementing this interface allows an object to clean up all resources it might have without having to use the finalizer() method. This way the object in control can force destruction rather than depending upon the VM or garbage collector doing it.
In addition, we misuse the Recyclable interface. We use it as a method of object clean up which it was not designed for. This interface will allow for objects to be destroyed and "nullified" thus rendering them useless. Whereas, recycle() will return an object to it's initial state the object had when it was created.
Recyclable| Method Summary | |
void |
destroy()
Destroy the object and it's resources. |
| Method Detail |
public void destroy()
This method when called should free all resources used by this object. In addition, it should render the object unusable. Therefore, this method should only be called once per object.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||