fix valgrind issue with lte-bearer test
authorTom Henderson <tomh@tomh.org>
Tue, 21 Dec 2010 16:13:14 -0800
changeset 6714 5f772405b80c
parent 6713 200cccff1299
child 6715 ba60c821ad35
fix valgrind issue with lte-bearer test
src/devices/lte/model/lte-mac-queue.cc
src/devices/lte/test/lte-bearer-test.cc
--- a/src/devices/lte/model/lte-mac-queue.cc	Tue Dec 21 17:46:35 2010 +0100
+++ b/src/devices/lte/model/lte-mac-queue.cc	Tue Dec 21 16:13:14 2010 -0800
@@ -99,6 +99,7 @@
 
 LteMacQueue::~LteMacQueue (void)
 {
+  m_queue.clear ();
 }
 
 
--- a/src/devices/lte/test/lte-bearer-test.cc	Tue Dec 21 17:46:35 2010 +0100
+++ b/src/devices/lte/test/lte-bearer-test.cc	Tue Dec 21 16:13:14 2010 -0800
@@ -102,7 +102,10 @@
       return true; // the queue should be empty
     }
 
-
+  // Free memory; handle reference cycle that bearer has with RlcEntity 
+  bearer->Dispose ();
+  bearer = 0;
+  Simulator::Destroy ();
 
   return (testResult);
 }