![]() |
TempNewHandle |
||||
Header: | MacMemory.h | Carbon status: | Supported | |
Allocates a new relocatable block of temporary memory.
Handle TempNewHandle ( Size logicalSize, OSErr *resultCode );
The requested logical size, in bytes, of the new temporary block of memory.
On return, the result code from the function call. See
A handle to a block of size logicalSize. If it cannot allocate a block of that size, the function returns NULL.
Before calling TempNewHandle, you should call TempFreeMem or TempMaxMem to make sure that there is enough free space to satisfy the request.
Because TempNewHandle might allocate memory, you should not call it at interrupt time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
Temporary memory allocations will actually come from the applicationss address space in Mac OS X. However, Carbon applications running under Mac OS 8.x will be able to get true temporary memory.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)