On 3/18/08, Velthoen, Arie <Arie.Velthoen at nec-philips.com> wrote: > > Hi Benny a.o., > > My application using pjsua-lib API suffers from memory-leakage, > and I suspect this is due to pjsua_player_destroy() > > I understand that: > with ticket 353 (http://trac.pjsip.org/repos/ticket/353) a > memory leak with pjsua file player was fixed. > This was done by creating a dedicated pool to be used with > pjmedia_wav_player_port_create, registered in > pjsua_var.player[file_id].pool, instead of using pjsua_var.pool. > With pjsua_player_destroy() the pool is released with > pj_pool_release(pjsua_var.player[id].pool). > > However: > in pjsua_player_create: pjmedia_conf_add_port() still takes from > pjsua_var.pool, which is released only when the application quits (?) True about pjsua_var.pool being released only when the application quits. > Why isn't the newly created pool used for pjmedia_conf_add_port() instead of > pjsua_var.pool? > > I found that pjsua_playlist_create passes the newly created pool to > pjmedia_conf_add_port(). > > Can I do the same with pjsua_player_create, or is more needed? > Yes you can, and I think this is a bug - pjmedia_conf_add_port() should use the wav player's pool rather than pjsua_var.pool. I just fixed this in r1874, can you try it out? thanks, -benny > Best regards, > > Arie Velthoen > _______________________________________________ > 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 > >