destroy the Node vector upon Simulator::Destroy rather than wait until the global static destructor of Node::g_nodes is invoked. This fixes a bad assert caught with valgrind.

This commit is contained in:
Mathieu Lacage
2007-05-02 10:33:39 +02:00
parent 1eeab81136
commit 6d4e502109
2 changed files with 26 additions and 4 deletions

View File

@@ -165,9 +165,11 @@ public:
// Global static variables
private:
static uint32_t g_nextId; // Next available ID
static SmartNodeVec_t g_nodes; // Vector of all nodes created
static SmartNodeVec_t g_prototypes; // Node prototype stack
static Node::SmartNodeVec_t **GetNodeVector (void);
static void DestroyNodes (void);
protected:
void SetId(uint32_t); // NodeList::Add() calls this