gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge
0 4 0
merge default
4 files changed with 18 insertions and 0 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -522,6 +522,12 @@
522 522
    cols.clear();
523 523
  }
524 524

	
525
  void GlpkBase::freeEnv() {
526
    glp_free_env();
527
  }
528

	
529
  GlpkBase::FreeEnvHelper GlpkBase::freeEnvHelper;
530

	
525 531
  // GlpkLp members
526 532

	
527 533
  GlpkLp::GlpkLp()
Ignore white space 6 line context
... ...
@@ -100,6 +100,18 @@
100 100

	
101 101
    virtual void _clear();
102 102

	
103
  private:
104

	
105
    static void freeEnv();
106

	
107
    struct FreeEnvHelper {
108
      ~FreeEnvHelper() {
109
        freeEnv();
110
      }
111
    };
112
    
113
    static FreeEnvHelper freeEnvHelper;
114
    
103 115
  public:
104 116

	
105 117
    ///Pointer to the underlying GLPK data structure.
0 comments (0 inline)