linphone-users
[Top][All Lists]
Advanced

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

[Linphone-users] memory leak problem in application based on linphone


From: Chi, Cai Xia (Caixia)
Subject: [Linphone-users] memory leak problem in application based on linphone
Date: Tue, 31 May 2005 12:44:12 +0800

We use Linphone (linphone-0.12.1) APIs to build a program, which can
generate a large number of concurrent dialogs.  However we find that there
is memory leaking in the program.  In the following sample code, we think
Dialog should have been destroyed and memory allocated to the dialog should
Have been freed when the dialog is terminated(by sending bye). But it seems
this is not the truth. What we have missed?
or
Is there anyone has sample code to send invite and destroy the dialog?

Many Thanks!


#define MAX_DIALOG_INTEST 1000

void client(){
        ...
        ...(some variable declarations)

        ua=osip_ua_new();
        osip_ua_set_contact(ua,local_sipurl);
        osip_ua_set_max_dialogs(ua,MAX_DIALOG_INTEST);

        sdph=sdp_handler_new();
        
sdp_handler_set_write_offer_fcn(SDP_HANDLER(sdph),set_audio_offer,NULL);
        osip_ua_add_body_handler(ua,sdph);

        dialog=osip_dialog_new(ua);
        osip_dialog_invite(dialog,callee,"application/sdp");
        sleep(1);
        osip_dialog_bye(dialog);
        sleep(10);
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]