OTFree
Frees memory allocated using theOTAllocfunction.C INTERFACE
OSStatus OTFree(void* ptr, OTStructType structType);C++ INTERFACE
OSResult TEndpoint::Free(void* ptr, OTStructType structType);PARAMETERS
ptr- A pointer to the structure to be deallocated. This is the pointer returned by the
OTAllocfunction.structType- The name of the structure for which you allocated memory using the
OTAllocfunction. Possible constant names are given by the structure types enumeration. (page 3-47)DESCRIPTION
In order to use theOTFreefunction, you must not have changed the memory allocated by theOTAllocfunction for the structure specified by thestructTypeparameter or for any of the buffers to which it points.You are responsible for passing a
structTypeparameter that exactly matches the type of structure being freed.The
OTFreefunction, along with theOTAllocfunction, is provided mainly for compatibility with XTI.VALID STATES
AllSEE ALSO
TheOTAllocfunction (page 3-92) allocates the memoryOTFreedeallocates.You use one of the constant names given by the structure types enumeration (page 3-47) to specify the structure to be freed.
To allocate raw memory, use the
OTAllocMemfunction, and to deallocate the allocated raw memory, use theOTFreeMemfunction, both described in the chapter "Process Management."