Try to put exit() after pj_shutdown(), not good solution though. Cheers, nanang On 10/04/2008, cingusoft <cingusoft at gmail.com> wrote: > I have added created a callback function > > static pj_status_t count_looped(){ > printf("PASSAGES %u",count_result); > if(count_result == 1){ > pj_pool_release( pool ); > pjmedia_endpt_destroy( med_endpt ); > pj_caching_pool_destroy( &cp ); > pj_shutdown(); > > }else{ > count_result = count_result + 1; > return PJ_SUCCESS; > } > } > > This is the callback function code. > > The problem is the pj_shutdown(), when is called, this return an error of > memory readed and the application don't close. > > Any idea?