[reSIProcate] memoru allocation & garbage collection

Scott Godin slgodin at icescape.com
Wed Oct 11 07:25:59 CDT 2006


The user profile is managed by a SharedPtr, so it will go away when either
dum or your application releases the SharedPtr (or it goes out of scope).  

The AppDialogSet is deleted automatically by dum.  See the class header file
for more info on overriding this behavior.

Scott

-----Original Message-----
From: resiprocate-devel-bounces at list.sipfoundry.org
[mailto:resiprocate-devel-bounces at list.sipfoundry.org] On Behalf Of Nicolas
LEGROS
Sent: Wednesday, October 11, 2006 4:49 AM
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 at 127.0.0.1");
    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 at list.sipfoundry.org
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel





More information about the resiprocate-devel mailing list