[Ns-bugs] [Bug 711] example mesh/mesh fails valgrind

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Tue Oct 13 01:21:03 PDT 2009


http://www.nsnam.org/bugzilla/show_bug.cgi?id=711





--- Comment #4 from Andrey Mazo <mazo at iitp.ru>  2009-10-13 04:21:03 EDT ---
(In reply to comment #2)
> Most memory leaks due to the old problem of trying to use stl::container.erase
> to release Ptr<x> without explicit zero of the Ptr.
Are there any FAQ entry about this old problem?
It's not an obvious thing, because erase() must call Ptr::~Ptr(), which in turn
must call Unref() and then free the allocated memory.
I don't yet understand, why it is required to call Unref() manually by setting
the Ptr to zero.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list