Important: The information in this document is obsolete and should not be used for new development.
NewEmptyHandleSys
If you want to initialize a handle in the system heap but not allocate any space for it, use theNewEmptyHandleSys
function. The Resource Manager uses this function extensively, but you probably won't need to use it.
FUNCTION NewEmptyHandleSys: Handle;DESCRIPTION
TheNewEmptyHandleSys
function initializes a new handle in the system heap by allocating a master pointer for it, but it does not allocate any memory for the handle to control.NewEmptyHandleSys
sets the handle's master pointer toNIL
.SPECIAL CONSIDERATIONS
BecauseNewEmptyHandleSys
might need to call theMoreMasters
procedure to allocate new master pointers, it might allocate memory. Thus, you should not callNewEmptyHandleSys
at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The registers on exit forNewEmptyHandleSys
are
Registers on exit A0 Address of the new block's master pointer D0 Result code RESULT CODES
noErr 0 No error memFullErr -108 Not enough memory SEE ALSO
When you want to allocate memory for the empty handle, use theReallocateHandle
procedure, described on page 2-52.