RE: [reSIProcate] Memory leaks because ofstd::auto_ptr<>::release()misuse
Good eye!
I think the following uses are definitely incorrect and I will fix them:
Sipmessage.cxx:113 actually line 152 in SVN head
ServerPublication.cxx:65,66
The other ones are in the DumFeature Chain code. I'm not too familiar
with that code, so I'll leave that up to the developer. But I suspect
that they are incorrect also.
Scott
> -----Original Message-----
> From: Justin Matthews [mailto:jmatthewsr@xxxxxxxxx]
> Sent: Tuesday, November 08, 2005 3:20 PM
> To: Scott Godin; 'Alexander Altshuler'; 'Resip Devel'
> Subject: RE: [reSIProcate] Memory leaks because
> ofstd::auto_ptr<>::release()misuse
>
> Other files that contain release() calls:
>
> Sipmessage.cxx:113
> Dialogusagemanager.cxx:813, 1121
> Outgoingevent.cxx:738
> ServerPublication.cxx:65,66
>
> Can someone confirm that these are possible locations for memory
leaks?
> My
> debug tool is reporting a leak at sipmessage.cxx:113 for sure.
>
> Thanks,
>
> -Justin
>
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
Scott
> Godin
> Sent: Friday, October 21, 2005 10:03 AM
> To: Alexander Altshuler; Resip Devel
> Subject: RE: [reSIProcate] Memory leaks because
> ofstd::auto_ptr<>::release()misuse
>
> Good find! I fixed all of the mProposedLocalSdp.release() calls.
>
> > -----Original Message-----
> > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-
> > devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Alexander Altshuler
> > Sent: Friday, October 21, 2005 8:01 AM
> > To: 'Resip Devel'
> > Subject: [reSIProcate] Memory leaks because of
> > std::auto_ptr<>::release()misuse
> >
> > Hi
> >
> > std::auto_ptr<>::release() does not destroy owned object!
> > It "returns wrapped pointer and give up ownership".
> >
> > But it is widely used within reSIProcate for owned object,
> > For example mProposedLocalSdp member of InviteSession.
> > So if mProposedLocalSdp was previously set
> > mProposedLocalSdp.release() produces memory leak
> >
> > auto_ptr<>::reset() must be used instead.
> >
> > mProposedLocalSdp is not only subject - we must check all others.
> >
> > Regards,
> > Alex
> >
> >
> >
> > _______________________________________________
> > 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