src/core/object-names.cc
changeset 4145 bb930262e55c
parent 4141 3f7f08d9daad
--- a/src/core/object-names.cc	Tue Jan 20 21:55:04 2009 -0800
+++ b/src/core/object-names.cc	Tue Jan 20 22:42:11 2009 -0800
@@ -17,12 +17,12 @@
  */
 
 #include <map>
-#include "ns3/object.h"
-#include "ns3/log.h"
-#include "ns3/assert.h"
-#include "ns3/abort.h"
+#include "object.h"
+#include "log.h"
+#include "assert.h"
+#include "abort.h"
+#include "object-names.h"
 #include "ns3/simulator.h"
-#include "object-names.h"
 
 namespace ns3 {
 
@@ -92,10 +92,9 @@
   Ptr<Object> FindObjectFromShortName (Ptr<Object> context, std::string name);
 
   static NamesPriv *Get (void);
-  
+  static void Delete (void);
 private:
   static NamesPriv **DoGet (void);
-  static void Delete (void);
 
   NameNode *IsNamed (Ptr<Object>);
   bool IsDuplicateName (NameNode *node, std::string name);
@@ -156,6 +155,10 @@
       delete i->second;
       i->second = 0;
     }
+
+  m_root.m_parent = 0;
+  m_root.m_name = "";
+  m_root.m_object = 0;
 }
 
 bool
@@ -444,6 +447,12 @@
     }
 }
 
+void
+Names::Delete (void)
+{
+  NamesPriv::Delete ();
+}
+
 bool
 Names::Add (std::string name, Ptr<Object> object)
 {