[Freeswitch-dev] Newbie question on switch_event_dup() and memory alloc/free in general
rupa at rupa.com
Mon Jun 28 23:33:25 PDT 2010
Yes, you must call destroy on the object if it has it.
On Tue, Jun 29, 2010 at 12:19 AM, Paul Li <plite2012 at gmail.com> wrote:
> A lot of FreeSwitch core APIs, such as switch_event_dup(switch_event_t
> **event, switch_event_t *todup), returns a pointer to an allocated
> memory chunk, should the caller always releases that memory chunk by
> calling a proper API, such as switch_event_destroy(switch_event_t
> I could not find any documentation to detail the general rule
> regarding memory allocation/free when using the core APIs.
> Thank you for your attention!
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-dev