cyclegraph: memory "leak", fixup
authorBrian Norris <banorris@uci.edu>
Tue, 5 Mar 2013 01:50:08 +0000 (17:50 -0800)
committerBrian Norris <banorris@uci.edu>
Tue, 5 Mar 2013 01:50:08 +0000 (17:50 -0800)
An insignificant memory leak.

cyclegraph.cc

index 240d24ffadd0b52af69e9318e53172f0806c6bb8..e96549ff1fddcace369f57102572edf2c6bf9c32 100644 (file)
@@ -8,7 +8,7 @@
 /** Initializes a CycleGraph object. */
 CycleGraph::CycleGraph() :
        discovered(new HashTable<const CycleNode *, const CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free>(16)),
-       queue(new       std::vector< const CycleNode *, ModelAlloc<const CycleNode *> >()),
+       queue(new std::vector< const CycleNode *, ModelAlloc<const CycleNode *> >()),
        hasCycles(false),
        oldCycles(false)
 {
@@ -17,6 +17,7 @@ CycleGraph::CycleGraph() :
 /** CycleGraph destructor */
 CycleGraph::~CycleGraph()
 {
+       delete queue;
        delete discovered;
 }