[Lemon-commits] [lemon_svn] deba: r2926 - hugo/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 21:51:17 CET 2006


Author: deba
Date: Wed Sep  6 12:10:48 2006
New Revision: 2926

Modified:
   hugo/trunk/lemon/graph_utils.h

Log:
Bug fix in DescriptorMap
Avoiding the possibility of the memory leak 



Modified: hugo/trunk/lemon/graph_utils.h
==============================================================================
--- hugo/trunk/lemon/graph_utils.h	(original)
+++ hugo/trunk/lemon/graph_utils.h	Wed Sep  6 12:10:48 2006
@@ -1260,7 +1260,12 @@
     ///
     /// Constructor for descriptor map.
     DescriptorMap(const Graph& _graph) : Map(_graph) {
-      build();
+      Item it;
+      const typename Map::Notifier* notifier = Map::getNotifier(); 
+      for (notifier->first(it); it != INVALID; notifier->next(it)) {
+	Map::set(it, invMap.size());
+	invMap.push_back(it);	
+      }      
     }
 
   protected:



More information about the Lemon-commits mailing list