COIN-OR::LEMON - Graph Library

Changes in / [541:89e29e22d479:542:fc6c7aab4b8d] in lemon-main


Ignore:
Location:
lemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/glpk.cc

    r540 r542  
    522522    cols.clear();
    523523  }
     524
     525  void GlpkBase::freeEnv() {
     526    glp_free_env();
     527  }
     528
     529  GlpkBase::FreeEnvHelper GlpkBase::freeEnvHelper;
    524530
    525531  // GlpkLp members
  • lemon/glpk.h

    r541 r542  
    101101    virtual void _clear();
    102102
     103  private:
     104
     105    static void freeEnv();
     106
     107    struct FreeEnvHelper {
     108      ~FreeEnvHelper() {
     109        freeEnv();
     110      }
     111    };
     112   
     113    static FreeEnvHelper freeEnvHelper;
     114   
    103115  public:
    104116
Note: See TracChangeset for help on using the changeset viewer.