COIN-OR::LEMON - Graph Library

Changeset 804:4db8d5ccd26b in lemon-1.2


Ignore:
Timestamp:
12/13/09 22:19:08 (10 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Memory leak bugfix in BellmanFord? (#51)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bellman_ford.h

    r788 r804  
    238238        _dist = Traits::createDistMap(*_gr);
    239239      }
    240       _mask = new MaskMap(*_gr, false);
     240      if(!_mask) {
     241        _mask = new MaskMap(*_gr);
     242      }
    241243    }
    242244   
     
    404406          _process.push_back(it);
    405407          _mask->set(it, true);
     408        }
     409      } else {
     410        for (NodeIt it(*_gr); it != INVALID; ++it) {
     411          _mask->set(it, false);
    406412        }
    407413      }
Note: See TracChangeset for help on using the changeset viewer.