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

[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