Important: The information in this document is obsolete and should not be used for new development.
DisposePalette
Disposes of a palette.
pascal void DisposePalette(PaletteHandle srcPalette);
srcPalette
- A handle to the palette to be disposed of.
DISCUSSION
TheDisposePalette
function disposes of the palette you specify in thesrcPalette
parameter. If the palette has any entries allocated for animation on any screen device, thenDisposePalette
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
orNSetPalette
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.