< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] memoru allocation & garbage collection


If you don't override destroy() - yes.

Alex

-----Original Message-----
From: Ira Kadin [mailto:ikadin@xxxxxxxxxxx] 
Sent: Monday, October 16, 2006 10:42 AM
To: Alexander Altshuler; resiprocate-devel
Subject: RE: [reSIProcate] memoru allocation & garbage collection

And Dum will distroy the AppDialogSet ?

Regards

Irena

-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
Alexander Altshuler
Sent: Wednesday, October 11, 2006 11:50 AM
To: 'resiprocate-devel'
Subject: Re: [reSIProcate] memoru allocation & garbage collection

UserProfile (wrapped into SharedPtr) will be destroyed by SharedPtr
framework when last reference will go away.

-----from AppDialogSet.hxx-----------------------
// by default, calls the destructor. application can override this if it
// wants to manage memory on its own. 
virtual void destroy();
-------------------------------------------------

Regards,
Alex

-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
Nicolas LEGROS
Sent: Wednesday, October 11, 2006 12:49 PM
To: resiprocate-devel
Subject: [reSIProcate] memoru allocation & garbage collection


Here's an example of an application running over DUM:

resip::SharedPtr<resip::UserProfile> profile(new resip::UserProfile()); 
    Data caller("sip:456@xxxxxxxxx");
    profile->setDefaultFrom(NameAddr(caller)); 
    
    SharedPtr<SipMessage> inv = mDum.makeInviteSession(NameAddr(callee),
        profile,&sdpContent, new AppDialogSet(*dumUac)); 


My question is concerning memory allocation and garbage collection.
In the example (see above), the application makes 2 memories allocation:
- new UserProfile()
- new AppDialogSet(*dumUac)

When the call will end, who will free this memory: DUM, Resiprocate
stack, the application?
Thanks by advance
Nicolas L.


_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel


_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel