From dcdca3338d34bc5d36be9b9f39a665de8cc39487 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 6 Aug 2007 10:09:18 +0200 Subject: [PATCH] fix memory leak --- src/routing/global-routing/global-route-manager-impl.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routing/global-routing/global-route-manager-impl.cc b/src/routing/global-routing/global-route-manager-impl.cc index 03578cb96..142f613be 100644 --- a/src/routing/global-routing/global-route-manager-impl.cc +++ b/src/routing/global-routing/global-route-manager-impl.cc @@ -1191,6 +1191,7 @@ GlobalRouteManagerImpl::SPFVertexAddParent (SPFVertex* v) // --------------------------------------------------------------------------- #include "ns3/test.h" +#include "ns3/simulator.h" namespace ns3 { @@ -1392,6 +1393,9 @@ GlobalRouteManagerImplTest::RunTests (void) // because the NodeList is empty srm->DebugSPFCalculate (lsa0->GetLinkStateId ()); // node n0 + Simulator::Run (); + Simulator::Destroy (); + // This delete clears the srm, which deletes the LSDB, which clears // all of the LSAs, which each destroys the attached LinkRecords. delete srm;