get rid of channel during dispose

This commit is contained in:
Mathieu Lacage
2008-03-31 14:43:38 -07:00
parent b41554c18f
commit 2c1c5afe91
2 changed files with 10 additions and 0 deletions

View File

@@ -153,6 +153,14 @@ SimpleNetDevice::SetReceiveCallback (NetDevice::ReceiveCallback cb)
m_rxCallback = cb;
}
void
SimpleNetDevice::DoDispose (void)
{
m_channel = 0;
m_node = 0;
NetDevice::DoDispose ();
}
} // namespace ns3

View File

@@ -44,6 +44,8 @@ public:
virtual bool NeedsArp (void) const;
virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
protected:
virtual void DoDispose (void);
private:
Ptr<SimpleChannel> m_channel;
NetDevice::ReceiveCallback m_rxCallback;