0
4
0
... | ... |
@@ -101,14 +101,18 @@ |
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 |
/// \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 |
|
|
113 | 117 |
///Pointer to the underlying GLPK data structure. |
114 | 118 |
LPX *lpx() {return lp;} |
0 comments (0 inline)