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: Memory /
Chapter 2 - Memory Manager / Memory Manager Reference
Memory Manager Routines / Allocating and Releasing Nonrelocatable Blocks of Memory


DisposePtr

When you are completely done with a nonrelocatable block, call the DisposePtr procedure to free it for other uses.

PROCEDURE DisposePtr (p: Ptr);
p
A pointer to the nonrelocatable block you want to dispose of.
DESCRIPTION
The DisposePtr procedure releases the memory occupied by the nonrelocatable block specified by p.

WARNING
After a call to DisposePtr, all pointers to the released block become invalid and should not be used again. Any subsequent use of a pointer to the released block might cause a system error.
SPECIAL CONSIDERATIONS
Because DisposePtr purges memory, you should not call it at interrupt time.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for DisposePtr are
Registers on entry
A0Pointer to the nonrelocatable block to be disposed of
Registers on exit
D0Result code

RESULT CODES
noErr0No error
memWZErr-111Attempt to operate on a free block

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996