Still memory leak with pjsua_player_destroy() inrelease 0.8.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Benny,

I have tested the fix with success:
I have made some 200000 calls using pjsua_player_create and
pjsua_player_destroy, without continuously increasing memory usage.

Regards,
Arie 
 

-----Original Message-----
From: pjsip-bounces@xxxxxxxxxxxxxxx
[mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of Benny Prijono
Sent: 2008-Mar-18 14:42
To: pjsip list
Subject: Re: Still memory leak with pjsua_player_destroy()
inrelease 0.8.0

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
>
>

_______________________________________________
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



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux