Important: The information in this document is obsolete and should not be used for new development.
TempNewHandle
To allocate a new relocatable block of temporary memory, call theTempNewHandle
function after making sure that there is enough free space to satisfy the request.
FUNCTION TempNewHandle (logicalSize: Size; VAR resultCode: OSErr): Handle;
logicalSize
The requested logical size, in bytes, of the new temporary block of memory.resultCode
On exit, the result code from the function call.DESCRIPTION
TheTempNewHandle
function returns a handle to a block of sizelogicalSize
. If it cannot allocate a block of that size, the function returnsNIL
. Before you use the returned handle, make sure its value is notNIL
.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forTempNewHandle
are
Trap macro Selector _OSDispatch $001D SPECIAL CONSIDERATIONS
BecauseTempNewHandle
might allocate memory, you should not call it at
interrupt time.Note that
TempNewHandle
returns its result code in a parameter, not throughMemError
.RESULT CODES
noErr 0 No error memFullErr -108 Not enough memory