If you use Gurobi Compute Server or a shared license via the token server, you may need to release the Gurobi environment. The steps vary by programming language:
- C: Call GRBfreemodel() for each model, then call GRBfreeenv() for the Gurobi environment
- C++: If you use pointers to GRBModel and GRBEnv objects, delete all GRBModel objects, then delete the GRBEnv object
- .Java: Call GRBModel.dispose() on all GRBModel objects, then call GRBEnv.dispose() on the GRBEnv object
- .NET: Call GRBModel.Dispose() on all GRBModel objects, then call GRBEnv.Dispose() on the GRBEnv object
- Python: Delete all Model objects, delete the Env object (if used), then call disposeDefaultEnv()
If you forget to do this, the solver may be temporarily unavailable for other programs.