You should delete both. The creation of a search engine takes a snapshot
clone by default, and the responsibility for anything returned is with the
client.

What the heck, you can already have a preview of the upcoming tutorial
documentation (where I just explained that). Please keep in mind that this
doc is for Gecode 3.0.0 (where the interface has changed quite some) and is
still being proofread:
        http://www.gecode.org/doc/3.0.0/modeling.pdf

Cheers
Christian

--
Christian Schulte, www.it.kth.se/~cschulte/


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Malcolm Ryan
Sent: Friday, March 06, 2009 8:42 AM
To: gecode list
Subject: [gecode-users] Deleting spaces

A question about memory management. If I do the following:

Space* space = new Space();
//... set up problem

Search::Options o;
Gecode::DFS<Space> dfs(space, o);

Space* result = dfs.next();

Should I now delete space? Should I delete result? Or do they belong  
to dfs?

Malcolm

_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users


_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to