[Freeswitch-dev] Newbie question on switch_event_dup() with a code snippet

Paul Li plite2012 at gmail.com
Tue Jun 29 20:03:17 PDT 2010

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 */


> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20100629/69692dfe/attachment.html 

More information about the FreeSWITCH-dev mailing list