TutCbDestroy destroy a callback and remove it from the list
cb
callback to be destroyed
TRUE
if successful, FALSE
otherwise.
None
This function destroys a callback. cb
is removed from the list to which it belongs and is never called again. Once this function is called, cb
is no longer valid. The pointer should not be referenced again.
Do not use cb
after destroying it.
This example creates a callback and then destroys it when called. The result is a callback that is processed exactly once.
static void T_ENTRY time_change_cb(dummy, data, arg) T_PTR dummy;/* always NULL */
T_TIME_CHANGE_CB_DATA data; T_CB_ARG arg; { TutOut("Time change callback called\n"); if (!TutCbDestroy(data->cb)) {/* error */
} } ... if (TutTimeChangeCbCreate(time_change_cb, NULL) == NULL) {/* error */
}
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |