Hi Jeff, app_config.pool should be the application's pool, which pjsua (or pjsua_destroy()) should have no knowledge of. Thus, application should do the cleanup prior to calling pjsua_destroy() (such as exemplified in app_destroy() in pjsua_app.c). So perhaps the bug could be somewhere else? Regards, Ming On Thu, Apr 3, 2014 at 4:56 PM, Jeff Localphone <jeff.localphone at gmail.com>wrote: > Hi, > > pjsua_app.c ( > http://svn.pjsip.org/repos/pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c) > contains a bug which might cause problems for people adapting this sample > application. > > > This code: > > > if (app_config.pool) { > pj_pool_release(app_config.pool); > app_config.pool = NULL; > } > > status = pjsua_destroy(); > > > ought to be: > > > status = pjsua_destroy(); > > if (app_config.pool) { > pj_pool_release(app_config.pool); > app_config.pool = NULL; > } > > > because pjsua_destroy() makes use of app_config.pool (e.g. in > pjmedia_delay_buf_destroy()) so the pool ought not to be released until > after pjsua_destroy() returns. > > > Warmest regards, > > Jeff Lawson > Software Development > Localphone <http://www.localphone.com/> - *ITSPA Award for Best Consumer > VoIP Provider 2013/2014* > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140404/2c20c6ff/attachment-0001.html>