help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Calling GLPK successively/iteratively/recurisvelyfor non


From: Andrew Makhorin
Subject: Re: [Help-glpk] Calling GLPK successively/iteratively/recurisvelyfor nonlinear problems.
Date: Mon, 25 Apr 2011 19:48:07 +0400

> Do I need to call glp_delete_prob() after each LP subproblem?
> 

Yes, if you wish to free the memory allocated to corresponding
problem objects.

glp_create_prob is a constructor, and glp_delete_prob is a destructor.
In C it is impossible to automatically call destructors to delete local
objects on exit from the block (as well as constructors on entry to a
block), and since glpk has no garbage collection, you need to call 
destructors explicitly in order to free all resources allocated to
the objects that are no longer needed/referenced.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]