![]() |
ATSUCustomFreeFunc |
||||
Header: | ATSUnicode.h | Carbon status: | Supported | |
Defines a pointer to a callback function that handles memory deallocation. Your callback function manages memory deallocation operations typically handled by ATSUI.
typedef void(* ATSUCustomFreeFunc) ( void *refCon, void *doomedBlock );
You would declare your function like this if you were to name it MyCallback:
void MyCallback ( void *refCon, void *doomedBlock );
On input, ATSUI passes your MyATSUCustomFreeCallback function a pointer to arbitrary data previously supplied by your application in the memoryRefCon field of the ATSUMemoryCallbacks union.
On input, ATSUI passes your MyATSUCustomFreeCallback function a pointer to the beginning of the block of memory to deallocate.
You can register your callback function by calling the function ATSUCreateMemorySetting and passing the constant kATSUUseCallbacks in iHeapSpec and a pointer to the ATSUMemoryCallbacks union in iMemoryCallbacks. You then supply a pointer of type ATSUCustomFreeFunc in the Free field of the callbacks structure of the ATSUMemoryCallbacks union.
Available beginning with ATSUI 1.1.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)