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:<br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">static void my_event_handler(switch_event_t *event)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> switch_event_t *clone = NULL;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> if (switch_event_dup(&clone, event) == SWITCH_STATUS_SUCCESS) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> /* use clone in my extended context */</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> switch_event_destroy(&clone);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">}</span><br><br>> Anthony Minessale<br>> Tue Jun 29 12:30:52 PDT 2010<br>><br>> yes any functions that take pointers to pointers and leave you with null<br>> will indicate you don't have to do anything.<br>
><br><br>