com.cafesoft.core.util
Interface Destroyable

All Known Subinterfaces:
CamsServiceMonitor, LiteObjectPool
All Known Implementing Classes:
StandardLiteObjectPool

public interface Destroyable

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.

Since:
2/13/03
See Also:
Recyclable

Method Summary
 void destroy()
          Destroy the object and it's resources.
 

Method Detail

destroy

public void destroy()
Destroy the object and it's resources.

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.



Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.