|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The NSDisposable interface declares one method, dispose
, in
which an object prepares for destruction. In dispose
, an object
should clear all references that other objects have to it. For
example, if an NSDisposable object has assigned itself as
another object's delegate, the NSDisposable object should set
the other object's delegate to null
in dispose
,
thus clearing the other object's reference to the NSDisposable object.
By implementing NSDisposable, objects are given a chance
to remove references that other objects have to them. This
allows other objects to send dispose
messages to NSDisposable
objects when the NSDisposable objects are no longer needed. As
an example, Direct to Java Client disposes of controllers when
they are no longer needed, and subsequently, the NSDisposable
controllers are garbage collected.
dispose
method will be invoked. If it won't be invoked
automatically, you can add yourself to an appropriate NSDisposableRegistry.
Known registries are provided by the com.webobjects.eoapplication
classes EOController and EOArchive.
dispose()
,
NSDisposableRegistry
Method Summary | |
void |
dispose()
Invoked when the receiver should prepare itself for destruction. |
Method Detail |
public void dispose()
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |