Carbon


CFragTermProcedure

Header: CodeFragments.h Carbon status: Supported

Defines a pointer to a fragment termination function. Your fragment initialization function is executed by the Code Fragment Manager when the fragment is unloaded from memory.

typedef void(* CFragTermProcedure) ();

You would declare your function like this if you were to name it MyCallback:

void MyCFragTermProcedure ();
DISCUSSION

A fragment’s termination function is executed immediately before the fragment is unloaded from memory. You can use the termination function to perform any necessary clean-up tasks, such as closing open resource files or disposing of any memory allocated by the fragment.

Note that a termination function is not passed any parameters and does not return any result. You are expected to maintain any information about the fragment (such as file reference numbers of any open files) in its static data area.

AVAILABILITY

Supported in Carbon.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)