Acquire
TheAcquiremethod increments an object's reference count by 1.
void Acquire ();DISCUSSION
Most methods that return a reference to a reference-counted object increment the object's reference count. However, if your part obtains a reference to a reference-counted object from a method that does not increment the object's reference count, you should call the object'sAcquiremethod before you cache the reference in any data structure. When the reference is replaced or removed from the data structure, you should call the object'sReleasemethod to decrement its reference count.OVERRIDING
Every subclass ofODRefCntObjecthas its own version of theAcquiremethod. Your subclass ofODPartoverrides this method if your part performs any specific actions when its reference count is incremented. The override method must call its inheritedAcquiremethod at the beginning of its implementation.SEE ALSO
TheODRefCntObject::Releasemethod (page 577).
TheODPartclass (page 459).
Table 2-1 on page 90 in OpenDoc Programmer's Guide.
"Reference-Counted Objects" on page 468 in OpenDoc Programmer's Guide.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help