[reSIProcate] Memory leaks because of std::auto_ptr<>::release() misuse
- From: "Alexander Altshuler" <alt@xxxxxxxxx>
- Date: Fri, 21 Oct 2005 16:01:06 +0400
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