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

Re: [reSIProcate-users] MessageDecorator::clone function of 1.4


        The caller takes ownership when it calls clone.

Best regards,
Byron Campen

The 1.4 has added a member function which named clone for class MessageDecorator, this is a
pure virtual function and requires implement it in derivation class.

I have been wrote this function as below:

MessageDecorator* SipMessageDecorator::clone() const
{
 SipMessageDecorator * decorator = new SipMessageDecorator;
 decorator->setStunResult(mStunIP, mStunPort);
 return (MessageDecorator *)decorator;
}


So far with my testing it's working fine, but does there has memeory leak with "SipMessageDecorator * decorator = new SipMessageDecorator;" ?
Please advice, thanks.
_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/

Attachment: smime.p7s
Description: S/MIME cryptographic signature