COIN-OR::LEMON - Graph Library

Ticket #213: 0fec6a017ead.patch

File 0fec6a017ead.patch, 1.7 KB (added by Balazs Dezso, 10 years ago)
  • lemon/glpk.cc

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1235426065 -3600
    # Node ID 0fec6a017eaddac797518d40c102144176c47fad
    # Parent  06e0fb20a97c9f9acbbd88cba806271b7c97ef08
    Fix GLPK tests (#213)
    
    diff -r 06e0fb20a97c -r 0fec6a017ead lemon/glpk.cc
    a b  
    522522    cols.clear();
    523523  }
    524524
     525  void GlpkBase::freeEnv() {
     526    glp_free_env();
     527  }
     528
    525529  // GlpkLp members
    526530
    527531  GlpkLp::GlpkLp()
  • lemon/glpk.h

    diff -r 06e0fb20a97c -r 0fec6a017ead lemon/glpk.h
    a b  
    102102
    103103  public:
    104104
     105    /// \brief Deallocates the globally allocated memory of GLPK.
     106
     107    /// Deallocates the globally allocated memory of GLPK.  \note
     108    /// Usually, it do not have to be called, because the GLPK use
     109    /// only a small amount of global memory, and it is deallocated
     110    /// automatically at the end of program.
     111    static void freeEnv();
     112
    105113    ///Pointer to the underlying GLPK data structure.
    106114    LPX *lpx() {return lp;}
    107115    ///Const pointer to the underlying GLPK data structure.
  • test/lp_test.cc

    diff -r 06e0fb20a97c -r 0fec6a017ead test/lp_test.cc
    a b  
    366366    lpTest(lp_glpk1);
    367367    aTest(lp_glpk2);
    368368  }
     369  GlpkLp::freeEnv();
    369370#endif
    370371
    371372#ifdef HAVE_CPLEX
  • test/mip_test.cc

    diff -r 06e0fb20a97c -r 0fec6a017ead test/mip_test.cc
    a b  
    115115    GlpkMip mip1;
    116116    aTest(mip1);
    117117  }
     118  GlpkLp::freeEnv();
    118119#endif
    119120
    120121#ifdef HAVE_CPLEX