Important: The information in this document is obsolete and should not be used for new development.
DisposeCollection
You can use theDisposeCollectionfunction to dispose of a collection object.
void DisposeCollection(Collection target);
target- A reference to the collection object you want to dispose of.
DESCRIPTION
TheDisposeCollectionfunction decrements the owner count of the collection object referenced by thetargetparameter. If the resulting owner count is 0, this function releases the memory occupied by the collection object, and the collection object reference contained in thetargetparameter becomes invalid.The behavior of this function is undefined if you do not provide a reference to a valid collection object in the
targetparameter.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
NewCollectionfunction, which is described on page 5-55.To increment the owner count of a collection object, use the
CloneCollectionfunction, which is described in the next section. To determine the owner count of an existing collection object, use theCountCollectionOwnersfunction, which is described on page 5-57.