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: Advanced Color Imaging Reference /
Chapter 1 - Palette Manager Reference /
Palette Manager Functions / Initializing and Allocating Palettes


DisposePalette

Disposes of a palette.

pascal void DisposePalette(PaletteHandle srcPalette);
srcPalette
A handle to the palette to be disposed of.
DISCUSSION
The DisposePalette function disposes of the palette you specify in the srcPalette parameter. If the palette has any entries allocated for animation on any screen device, then DisposePalette relinquishes these entries before the palette's memory is released.

If a palette is attached to a window automatically--because the palette resource and the window have the same ID--you do not have to call the DisposePalette function to dispose of the function. The Palette Manager and Window Manager dispose of the palette automatically if the palette is replaced or if the window goes away.

However, if you explicitly attach a palette to a window with the SetPalette or NSetPalette function, your application owns the palette and is responsible for disposing of it.

SPECIAL CONSIDERATIONS
It is possible to attach a single palette to multiple windows; therefore, even when a window goes away and no longer needs a palette, other windows may still need it.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996