Package | org.as3coreaddendum.system |
Interface | public interface IDisposable |
When the dispose()
method is invoked on an object, it should stop all its processes and kill all its references to another objects, explicitly controlling the lifecycle of all its dependencies.
If the dependency also implements this interface, its dispose()
method should be called by this object.
If the object has a parent class (base class) and the parent class also implements this interface, the dispose()
method of the parent class should be called, propagating this action through the hierarchy of parents.
If the dispose()
method is called more than once, the object should ignore all calls after the first one, without throwing an error.
Since the dispose()
method was called, the object just wait to be released from memory by the garbage collection process.
The object should throw the org.as3coreaddendum.errors.ObjectDisposedError if some method is called after the dispose()
method was called, indicating an illegal operation.
See also
Method | Defined By | ||
---|---|---|---|
dispose():void
Dispose the object to be garbage collected. | IDisposable |