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: More Macintosh Toolbox /
Chapter 4 - List Manager / List Manager Reference
List Manager Routines / Creating and Disposing of Lists


LDispose

You can use the LDispose procedure to dispose of the memory associated with a list that you no longer need.

PROCEDURE LDispose (lHandle: ListHandle);
lHandle
The list to be disposed of.
DESCRIPTION
The LDispose procedure releases all memory allocated by the List Manager in creating a list. First, LDispose issues a close request to the list definition procedure and calls the Control Manager procedure DisposeControl for the list's scroll bars (if any). LDispose then uses the Memory Manager to free the memory referenced by the cells field, then disposes of the list record itself.

Because LDispose disposes of data associated with cells in your list, there is no need to clear the data from list cells or to delete individual rows and columns before calling LDispose.

The LDispose procedure does not dispose of any memory associated with a list that the List Manager has not allocated. In particular, LDispose does not dispose of any memory referenced by the userHandle field of the list record. Your application is responsible for deallocating any memory it has allocated through the userHandle field before calling LDispose.

SPECIAL CONSIDERATIONS
You should not call the LDispose procedure from within an interrupt, such as in a completion routine or VBL task.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the LDispose procedure are
Trap macroSelector
_Pack0$0028


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996