Implement BlockAckManager::DoDispose ()

Nullify all Ptr's there to remove possible circular references.

Do not set m_queue Ptr in the destructor, it is destroyed anyway.
This commit is contained in:
Alexander Krotov
2021-08-22 18:38:15 +03:00
parent 24d671704a
commit dedcbd8c1e
2 changed files with 13 additions and 2 deletions

View File

@@ -72,9 +72,17 @@ BlockAckManager::BlockAckManager ()
BlockAckManager::~BlockAckManager ()
{
NS_LOG_FUNCTION (this);
m_queue = 0;
}
void
BlockAckManager::DoDispose ()
{
NS_LOG_FUNCTION (this);
m_agreements.clear ();
m_retryPackets = 0;
m_retryPackets = nullptr;
m_bars.clear ();
m_queue = nullptr;
m_stationManager = nullptr;
}
bool

View File

@@ -431,6 +431,9 @@ public:
*/
void ScheduleBar (Ptr<const WifiMacQueueItem> bar, bool skipIfNoDataQueued = false);
protected:
void DoDispose () override;
private:
/**
* Inactivity timeout function