diff --git a/Contractor/Contractor.h b/Contractor/Contractor.h index 941fb65f6..8dbaad5cc 100644 --- a/Contractor/Contractor.h +++ b/Contractor/Contractor.h @@ -171,6 +171,7 @@ public: std::cout << "merged " << edges.size() - edge << " edges out of " << edges.size() << std::endl; edges.resize( edge ); + _graph.reset(); _graph.reset( new _DynamicGraph( nodes, edges ) ); INFO("Finished building dynamic graph"); edges.clear();