Bug fix in DescriptorMap
authordeba
Wed, 06 Sep 2006 10:10:48 +0000
changeset 2201597714206430
parent 2200 2f2ac1b1ca1e
child 2202 09cbc87cb4ab
Bug fix in DescriptorMap
Avoiding the possibility of the memory leak
lemon/graph_utils.h
     1.1 --- a/lemon/graph_utils.h	Wed Sep 06 10:01:15 2006 +0000
     1.2 +++ b/lemon/graph_utils.h	Wed Sep 06 10:10:48 2006 +0000
     1.3 @@ -1260,7 +1260,12 @@
     1.4      ///
     1.5      /// Constructor for descriptor map.
     1.6      DescriptorMap(const Graph& _graph) : Map(_graph) {
     1.7 -      build();
     1.8 +      Item it;
     1.9 +      const typename Map::Notifier* notifier = Map::getNotifier(); 
    1.10 +      for (notifier->first(it); it != INVALID; notifier->next(it)) {
    1.11 +	Map::set(it, invMap.size());
    1.12 +	invMap.push_back(it);	
    1.13 +      }      
    1.14      }
    1.15  
    1.16    protected: