Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Environment and Utilities /
Chapter 5 - Collection Manager / Collection Manager Reference
Functions / Creating and Disposing of Collection Objects


DisposeCollection

You can use the DisposeCollection function to dispose of a collection object.

void DisposeCollection(Collection target);
target
A reference to the collection object you want to dispose of.
DESCRIPTION
The DisposeCollection function decrements the owner count of the collection object referenced by the target 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 the target 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 the CountCollectionOwners function, which is described on page 5-57.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996