From e320d42a37f2cfb36ce7444dea8cc18ac824f649 Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Tue, 29 Mar 2011 18:28:55 +0200 Subject: [PATCH] added DoDispose to lte-phy and lte-spectrum-phy --- src/lte/model/lte-enb-phy.cc | 7 +++++++ src/lte/model/lte-enb-phy.h | 1 + src/lte/model/lte-phy.cc | 1 + src/lte/model/lte-spectrum-phy.cc | 4 +++- src/lte/model/lte-ue-phy.cc | 4 ++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/lte/model/lte-enb-phy.cc b/src/lte/model/lte-enb-phy.cc index 8e472baa1..5a76c93e3 100644 --- a/src/lte/model/lte-enb-phy.cc +++ b/src/lte/model/lte-enb-phy.cc @@ -120,6 +120,13 @@ LteEnbPhy::~LteEnbPhy () { } +void +LteEnbPhy::DoDispose () +{ + NS_LOG_FUNCTION (this); + LtePhy::DoDispose (); +} + void LteEnbPhy::SetLteEnbPhySapUser (LteEnbPhySapUser* s) { diff --git a/src/lte/model/lte-enb-phy.h b/src/lte/model/lte-enb-phy.h index 0f860ede2..37d8f2b17 100644 --- a/src/lte/model/lte-enb-phy.h +++ b/src/lte/model/lte-enb-phy.h @@ -52,6 +52,7 @@ public: virtual ~LteEnbPhy (); static TypeId GetTypeId (void); + virtual void DoDispose (void); /** diff --git a/src/lte/model/lte-phy.cc b/src/lte/model/lte-phy.cc index faaadd0a5..3069b4ba3 100644 --- a/src/lte/model/lte-phy.cc +++ b/src/lte/model/lte-phy.cc @@ -87,6 +87,7 @@ LtePhy::DoDispose () m_packetBurstQueue.erase (m_packetBurstQueue.begin (), m_packetBurstQueue.end ()); m_controlMessagesQueue.erase (m_controlMessagesQueue.begin (), m_controlMessagesQueue.end ()); } + Object::DoDispose (); } void diff --git a/src/lte/model/lte-spectrum-phy.cc b/src/lte/model/lte-spectrum-phy.cc index 63258f6a8..c9b3683ee 100644 --- a/src/lte/model/lte-spectrum-phy.cc +++ b/src/lte/model/lte-spectrum-phy.cc @@ -41,6 +41,7 @@ NS_OBJECT_ENSURE_REGISTERED (LteSpectrumPhy); LteSpectrumPhy::LteSpectrumPhy () : m_state (IDLE) { + NS_LOG_FUNCTION (this); } @@ -50,10 +51,11 @@ LteSpectrumPhy::~LteSpectrumPhy () void LteSpectrumPhy::DoDispose () { - m_channel->Dispose (); + NS_LOG_FUNCTION (this); m_channel = 0; m_mobility = 0; m_device = 0; + SpectrumPhy::DoDispose (); } std::ostream& operator<< (std::ostream& os, LteSpectrumPhy::State s) diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index 49729431c..41de2de85 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -111,6 +111,8 @@ LteUePhy::~LteUePhy () void LteUePhy::DoDispose () { + NS_LOG_FUNCTION (this); + LtePhy::DoDispose (); } @@ -129,12 +131,14 @@ LteUePhy::GetTypeId (void) void LteUePhy::SetLteUePhySapUser (LteUePhySapUser* s) { + NS_LOG_FUNCTION (this); m_uePhySapUser = s; } LteUePhySapProvider* LteUePhy::GetLteUePhySapProvider () { + NS_LOG_FUNCTION (this); return (m_uePhySapProvider); }