Bug 721

Summary: Explicit releases of Ptr<> throughout codebase
Product: ns-3 Reporter: Craig Dowell <craigdo>
Component: coreAssignee: ns-bugs <ns-bugs>
Status: NEW ---    
Severity: minor CC: mathieu.lacage
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Craig Dowell 2009-10-14 19:39:40 UTC
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.
Comment 1 Mathieu Lacage 2009-11-24 05:00:24 UTC
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.