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 |
| A0 | Pointer to the nonrelocatable block to be disposed of |
| Registers on exit |
| D0 | Result code |
RESULT CODES
| noErr | 0 | No error |
| memWZErr | -111 | Attempt to operate on a free block |