30 Jun
2010
30 Jun
'10
3:03 a.m.
I guess you were assuming I would pass the event clone (pointer) to the core API (such as switch_event_fire), so that I would not need to free the clone pointer. I guess I still need to destroy it in the following scenario: static void my_event_handler(switch_event_t *event) { switch_event_t *clone = NULL; if (switch_event_dup(&clone, event) == SWITCH_STATUS_SUCCESS) { /* use clone in my extended context */ switch_event_destroy(&clone); } }
Anthony Minessale Tue Jun 29 12:30:52 PDT 2010
yes any functions that take pointers to pointers and leave you with null will indicate you don't have to do anything.