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.
>
_______________________________________________
FreeSWITCH-dev mailing list
FreeSWITCH-dev@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org

Reply via email to