On Fri, Dec 5, 2008 at 2:44 PM, Filip Konvička <[EMAIL PROTECTED]> 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.

Cheers,
Mikael

-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to