Bugzilla – Full Text Bug Listing |
Summary: | sanity check for not calling Object::Dispose () twice | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Nicola Baldo <nicola> |
Component: | core | Assignee: | Mathieu Lacage <mathieu.lacage> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | ns-bugs |
Priority: | P5 | ||
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | sanity check on Object::Dispose() |
No, this is not needed: 1) it is already implemented. Did you not notice the m_disposed member variable ? 2) your implementation is not correct. To summarize, you can already call Dispose many times on the same object or different objects aggregated together and DoDispose will be called only once for each aggregated object. Fine, but then we(In reply to comment #1) > No, this is not needed: > 1) it is already implemented. Did you not notice the m_disposed member variable > ? I didn't notice because I was only looking at the doxygen documentation, which still said that it in as error to call Dispose twice. I just pushed changeset 6988:3f0d3324cbc5 to update the documentation according to your comment. |
Created attachment 1055 [details] sanity check on Object::Dispose() I wrote this patch to make sure that Object::Dispose () was not called twice on the same object in some code of mine. Is it of any real use?