do destructive session destroy in debug mode.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4922 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-04-12 20:09:23 +00:00
parent 50b5fe43a2
commit 8199beaf27
1 changed files with 3 additions and 0 deletions

View File

@ -671,6 +671,9 @@ SWITCH_DECLARE(void) switch_core_session_destroy(switch_core_session_t **session
switch_channel_uninit((*session)->channel);
pool = (*session)->pool;
#ifndef NDEBUG
memset(*session, 0, sizeof(switch_core_session_t));
#endif
*session = NULL;
apr_pool_destroy(pool);
pool = NULL;