Important: The information in this document is obsolete and should not be used for new development.
OTDestroySystemTask
Destroys a system task created with theOTCreateSystemTaskfunction.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
TheOTDestroySystemTaskfunction makes thestCookiereference 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. IfstCookieis already invalid (a value of 0), the function returnskOTNoErrorand does nothing.If you try to destroy a task that is still scheduled for execution, the
OTDestroySystemTaskfunction 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, theOTDestroySystemTaskfunction simply destroys it.SEE ALSO
TheOTCreateSystemTaskfunction.The
OTScheduleSystemTaskfunction.The
OTCancelSystemTaskfunction.