| 43 | } |
| 44 | |
| 45 | void GurobiWrapper::freeModelIfNeeded() |
| 46 | { |
| 47 | for ( auto &entry : _nameToVariable ) |
| 48 | { |
| 49 | delete entry.second; |
| 50 | entry.second = NULL; |
| 51 | } |
| 52 | _nameToVariable.clear(); |
| 53 | |
| 54 | if ( _model ) |
| 55 | { |
| 56 | delete _model; |
| 57 | _model = NULL; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | void GurobiWrapper::freeMemoryIfNeeded() |
| 62 | { |