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 / Using the Collection Manager


Creating or Disposing of a Collection

The Collection Manager provides a number of ways for you to create a collection object:

The NewCollection function creates a new collection object containing no collection items. The section "Adding Items to a Collection" beginning on page 5-17 shows how you can add items to a new collection.

The default attributes of the new, empty collection are described by the defaultCollectionAttributes constant, in which only the persistence attribute is set. This constant is defined in "Attributes Masks" beginning on page 5-49. The section "Changing the Default Attributes of a Collection" beginning on page 5-15 shows how you can change the default attributes of the new collection.

The owner count of the new collection is 1. You can increment the collection's owner count using the CloneCollection function, as shown in the section "Cloning or Copying a Collection" beginning on page 5-14. You can decrement the collection's owner count using the DisposeCollection function. This function decrements the owner count of a collection and frees the memory used by the collection if the owner count becomes 0.

You can find more information about the NewCollection function on page 5-54. You can find more information about the DisposeCollection function on page 5-55.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996