Hi.. I'm facing a problem with memory leaks when implementing my own brancher in Gecode 3.4.0, using the GCC compiler on an ubuntu platform.
My problem is that I want to save both a position for a variable but also a list of values to branch on. This list is created as a vector<int> in the implemented brancher together with the position as mutable vector<int> alternatives; mutable int v; I have a choice object as well with a vector and an integer to be stored in the choice. In the status() function I fill in the alternatives with the push_back() function, and it is here I get my leaks when running with valgrind. When I have created the choice in the Choice() function of the brancher I remember to clear the vector of alternatives (Since choice takes a local copy for the choice object). I suppose that when deleting my choice pointer in the search engine, I also delete the elements in the list of alternatives in the choice object? I suspect that the problem lies within the garbage collector of the choice. Hope you can help! Cheers, Anders
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
