[Ns-developers] BridgeChannel::~BridgeChannel
Gustavo Carneiro
gjcarneiro at gmail.com
Wed Oct 14 07:16:18 PDT 2009
2009/10/14 Andrey Mazo <mazo at iitp.ru>
> Craig, can you please help me (maybe others) understand why this is needed?
>> Presumably, the BridgeChannel destructor implicitly will call the
>> destructor
>> of m_bridgeChannels (vector), which would call the destructor for each
>> element inside, and finally Ptr<Channel>::~Ptr<Channel>() would Unref the
>> object. So, in theory C++ should take care of everything, and so isn't
>> the
>> code you inserted completely redundant?
>>
> Have the same question in bug #711 [1].
> The only answer is that it's an old problem [2].:)
>
Yes, but if it's a problem, it is so fundamental that is worth investigating
and documenting. Could it be that we are only working around a valgrind
bug? If so, adding an explanatory comment stating this would be warranted.
>
> [1] http://www.nsnam.org/bugzilla/show_bug.cgi?id=711#c4
> [2] http://www.nsnam.org/bugzilla/show_bug.cgi?id=711#c2
>
>
> --
> Andrey Mazo.
>
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list