[gecode-users] Constant view disposer

Christian Schulte cschulte at kth.se
Mon Aug 4 10:52:02 CEST 2014


Hi Gustavo,

 

Unfortunately, there is currently no way to have dispose called on a constant view, it is only available for variable implementations.

 

There are two ways you could deal with this: (a) do not use constant views but just variable views (b) extend Gecode such that also constant views can register for disposal. (b) might actually not be that difficult, it could re-use the infra structure that is already there for disposal of variable implementations. If you come up with a patch for (b) we could see whether we add it to Gecode provided it only costs when the feature is being used.

 

Cheers

Christian

 

--

Christian Schulte, KTH, web.it.kth.se/~cschulte/

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Gustavo Gutierrez
Sent: Saturday, August 2, 2014 06:42 PM
To: gecode list
Subject: [gecode-users] Constant view disposer

 

Dear all,

 

I am well aware of the disposal mechanism implemented in geocode for the variable implementations that require to be explicitly disposed. Actually I am using it for a variable implementation that uses some reference counting mechanism. I was wondering if there is some kind of disposal support for constant views.

 

To be more precise, a constant view in my case has an attribute which is reference counted. I need its counter to be decremented when the view gets destroyed (or disposed). I was looking in the documentation for a dispose method. Something similar to what exists in RelVarImpBase. It is quite probable that I am missing something and hence I would like any help on this.

 

Kind regards,

-- 
Gustavo Gutierrez 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140804/1184cff4/attachment.html>


More information about the users mailing list