Important: The information in this document is obsolete and should not be used for new development.
OTDestroySystemTask
Destroys a system task created with theOTCreateSystemTask
function.C INTERFACE
OSStatus OTDestroySystemTask(long stCookie)C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
stCookie
- A reference value that identifies the system task to be destroyed.
- function result
- The result
kOTNoError
.DISCUSSION
TheOTDestroySystemTask
function makes thestCookie
reference invalid and frees any resources allocated to the task when it was created. You can call this function when you no longer need to schedule the system task, such as when it has executed and you have no plans to reschedule it for later use. IfstCookie
is already invalid (a value of 0), the function returnskOTNoError
and does nothing.If you try to destroy a task that is still scheduled for execution, the
OTDestroySystemTask
function cancels it first, so that it is no longer scheduled for system task execution, and then destroys it. If the task has already been canceled, theOTDestroySystemTask
function simply destroys it.SEE ALSO
TheOTCreateSystemTask
function.The
OTScheduleSystemTask
function.The
OTCancelSystemTask
function.