Register or unregister an object for destruction when a pinboard-layout is destroyed.
The functions record-dependent-object
and unrecord-dependent-object
are part of a mechanism for destroying objects when a pinboard-layout is destroyed.
record-dependent-object
records the object
object
, which means that when
pinboard-layout
is destroyed, destroy-dependent-object is applied to
object
.
unrecord-dependent-object
removes
object
from the dependents, comparing objects by cl:equal
.
It is possible to record the same object more than once. unrecord-dependent-object
removes one occurrence of object at most. If there is no object, it does nothing.
These functions are not designed to deal with many calls to record-dependent-object
and unrecord-dependent-object
. If you need to deal with many objects, you can either use the
destroy-callback
of pinboard-layout (inherited from output-pane), or add a single object of your object type (class or structure) and define a destroy-dependent-object method for it that will deal with the many objects in an optimal way.
CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017