naginterfaces.library.opt.handle_​free

naginterfaces.library.opt.handle_free(handle)[source]

handle_free is a part of the NAG optimization modelling suite. It is used to deallocate the memory used within the problem handle and to destroy the handle itself.

For full information please refer to the NAG Library document for e04rz

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/e04/e04rzf.html

Parameters
handleHandle, modified in place

On entry: the handle to the problem. It needs to be initialized (e.g., by handle_init()) and must not be changed between calls to the NAG optimization modelling suite.

On exit: the handle is destroyed and set to a null Handle.

Raises
NagValueError
(errno )

does not belong to the NAG optimization modelling suite, has not been initialized properly or is corrupted.

(errno )

has not been initialized properly or is corrupted.

Notes

Each initialized problem handle (e.g., by handle_init()) should be deallocated to avoid memory leaks. Therefore, handle_free should be called on all the handles which are no longer needed, typically after obtaining results from the solver. Please note that passing a handle which has not been properly initialized might cause unpredictable behaviour, including a crash of your program. See the E04 Introduction for more details about the NAG optimization modelling suite.