Correct.  The memory is allocated from the session's pool and will not be valid when the call ends.

For persistent memory allocation, create your own pool when the module loads, (or use the one passed to you in the init function) and use switch_core_alloc instead.

What module are you writing?



On Wed, Mar 30, 2016 at 4:48 PM, Ahmed habiba <ahabiba@gmail.com> wrote:
Hi,

I’m trying to use “switch_core_session_alloc” in a new module however I notice in documentation the below note, does this mean that once the session hangup this memory segment will not be valid anymore and I should not use this segment again?, your kind feedback will be appreciated.

"Note:
the memory will be in scope as long as the session exists"


Thanks,

Ahmed Habiba.

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--
Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬

ClueCon Weekly Development Call 
☎ sip:888@conference.freeswitch.org  ☎ +19193869900