Bug 721 - Explicit releases of Ptr<> throughout codebase
Explicit releases of Ptr<> throughout codebase
Status: NEW
Product: ns-3
Classification: Unclassified
Component: core
ns-3-dev
All All
: P5 minor
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-14 19:39 EDT by Craig Dowell
Modified: 2009-11-24 05:00 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Dowell 2009-10-14 19:39:40 EDT
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 EST
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.