Bugzilla – Bug 721
Explicit releases of Ptr<> throughout codebase
Last modified: 2009-11-24 05:00:24 EST
It used to be the case that when stl containers were used with ns-3::Ptr<>, an explicit release of the Ptr was required (e.g, *i = 0) to avoid memory leaks. This behavior has changed and I can no longer verify any leaks when this these releases are removed.
There are vestigial remains of this problem scattered throught the codebase which should be removed since they now reflect unnecessary complexity that is being cut and pasted into new code.
I am not sure which problematic examples you have in mind but to make sure that we correctly handle reference cycles, it is still necessary to make DoDispose in many objects actually assign its Ptr<T> members to 0.