[gecode-users] getting all solutions + interrupting gecode
Mikael Zayenz Lagerkvist
zayenz at gmail.com
Fri Dec 5 15:21:44 CET 2008
On Fri, Dec 5, 2008 at 2:44 PM, Filip Konvička <filip.konvicka at logis.cz> wrote:
> Just a technical note - this is quite error-prone, because throwing
> exception or returning in "do something..." results in memory leaks.
Yes, using some auto_ptr-version is of course much better. My example
was only meant for the case where the loop is in the main-function, as
was the case in the OP. Thanks for the improved code.
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
More information about the gecode-users