[Gecode] Memory leak in the sets

Christian Schulte schulte at imit.kth.se
Thu Sep 2 10:41:40 CEST 2004


Dear all,

I would like to clarify the problem here: it is not about how destructors
are handeled, it is about the simple point that space-allocated memory is
just not useful for temporary data structures. This is absolutely clear.

Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: gecode-bounces at ps.uni-sb.de [mailto:gecode-bounces at ps.uni-sb.de] On
Behalf Of Guido Tack
Sent: Wednesday, September 01, 2004 5:26 PM
To: gecode at ps.uni-sb.de
Subject: [Gecode] Memory leak in the sets


Hi.

Unfortunately we have a memory leak in the n-ary set propagators, and I have

no idea how to fix it: some n-ary propagators keep a GrowingSet containing 
e.g. the union of the already determined variables. The memory for this set 
of course comes from the space, but it is never freed. We cannot give a 
destructor for IntegerSets because that would need the home space (for 
dispose of a free list).
I have taken care of all the other intermediate results we store in integer 
sets, although this is also not optimal - you have to dispose the sets 
manually when you don't use them any longer.
Maybe we should think of a different data structure for these intermediates.

Guido

-- 
Guido Tack
http://www.ps.uni-sb.de/~tack
_______________________________________________
Gecode mailing list
Gecode at ps.uni-sb.de http://www.ps.uni-sb.de/mailman/listinfo/gecode





More information about the gecode-users mailing list