Important: The information in this document is obsolete and should not be used for new development.
DisposeCollection
You can use theDisposeCollection
function to dispose of a collection object.
void DisposeCollection(Collection target);
target
- A reference to the collection object you want to dispose of.
DESCRIPTION
TheDisposeCollection
function decrements the owner count of the collection object referenced by thetarget
parameter. If the resulting owner count is 0, this function releases the memory occupied by the collection object, and the collection object reference contained in thetarget
parameter becomes invalid.The behavior of this function is undefined if you do not provide a reference to a valid collection object in the
target
parameter.SEE ALSO
For general information about QuickDraw GX objects, see the chapter "Introduction to QuickDraw GX" in Inside Macintosh: QuickDraw GX Objects.For examples using this function, see "Creating or Disposing of a Collection" beginning on page 5-14.
To create a new collection object, use the
NewCollection
function, which is described on page 5-55.To increment the owner count of a collection object, use the
CloneCollection
function, which is described in the next section. To determine the owner count of an existing collection object, use theCountCollectionOwners
function, which is described on page 5-57.