added more disposal stuff

This commit is contained in:
Nicola Baldo
2011-03-30 16:41:45 +02:00
parent 43ee039116
commit aa087ed344
4 changed files with 24 additions and 20 deletions

View File

@@ -58,7 +58,7 @@ TypeId LteEnbNetDevice::GetTypeId (void)
.SetParent<LteNetDevice> ()
.AddConstructor<LteEnbNetDevice> ()
.AddAttribute ("LteEnbRrc",
"The RRC associated to this EnbNetDevice.",
"The RRC associated to this EnbNetDevice",
PointerValue (),
MakePointerAccessor (&LteEnbNetDevice::m_rrc),
MakePointerChecker <LteEnbRrc> ())
@@ -94,14 +94,17 @@ LteEnbNetDevice::DoDispose ()
{
NS_LOG_FUNCTION (this);
// m_mac->Dispose ();
// m_mac = 0;
//
// m_rrc->Dispose ();
// m_rrc = 0;
//
// m_phy->Dispose ();
// m_phy = 0;
m_mac->Dispose ();
m_mac = 0;
m_scheduler->Dispose ();
m_scheduler = 0;
m_rrc->Dispose ();
m_rrc = 0;
m_phy->Dispose ();
m_phy = 0;
LteNetDevice::DoDispose ();
}

View File

@@ -124,6 +124,7 @@ void
LteEnbPhy::DoDispose ()
{
NS_LOG_FUNCTION (this);
m_ueAttached.clear ();
LtePhy::DoDispose ();
}

View File

@@ -79,14 +79,13 @@ void
LtePhy::DoDispose ()
{
NS_LOG_FUNCTION (this);
m_packetBurstQueue.clear ();
m_controlMessagesQueue.clear ();
m_downlinkSpectrumPhy->Dispose ();
m_downlinkSpectrumPhy = 0;
m_uplinkSpectrumPhy->Dispose ();
m_uplinkSpectrumPhy = 0;
m_netDevice = 0;
for (int i = 0; i < m_macChTtiDelay; i++)
{
m_packetBurstQueue.erase (m_packetBurstQueue.begin (), m_packetBurstQueue.end ());
m_controlMessagesQueue.erase (m_controlMessagesQueue.begin (), m_controlMessagesQueue.end ());
}
Object::DoDispose ();
}

View File

@@ -90,13 +90,14 @@ void
LteUeNetDevice::DoDispose (void)
{
NS_LOG_FUNCTION (this);
m_targetEnb->Dispose ();
m_targetEnb = 0;
// m_mac->Dispose ();
// m_mac = 0;
// m_rrc->Dispose ();
// m_rrc = 0;
// m_phy->Dispose ();
// m_phy = 0;
m_mac->Dispose ();
m_mac = 0;
m_rrc->Dispose ();
m_rrc = 0;
m_phy->Dispose ();
m_phy = 0;
LteNetDevice::DoDispose ();
}