Terminating data objects
Explains how to use the method end to free memory in IBM ILOG Script and interfaces.
Use the method end to free memory in IBM ILOG Script and interfaces.
A complex model may manage separate submodels, data sources, run configurations, solvers, additional variables to move data between models, and so on. Accordingly, it is a good practice to systemically terminate these additional data objects when they are no longer needed. IBM ILOG Script for OPL provides the end method for the class IloObject, which is inherited by all other IBM ILOG Script classes. Similarly, the OPL Interfaces APIs have the end method for the class IloExtractable, which is also inherited by nearly all OPL Interfaces classes.
By using the method end to free objects, you greatly improve management of the total memory in use.
For more information and examples, please see the documentation for the classes IloObject or IloExtractable, and section Ending objects in the Language User’s Manual.