A destructor can be attached to a blob representation of a hashtable pointer. This descructor can destroy a hashtable automatically. The destroy functions should become obsolete to prevent duplicate destruction.

Submitted on 6 September 2004 at 09:39

On 25 September 2004 at 00:42 Jira commented:

STR-168, martin:
Cool to have, but requires more work. Moved to 0.13


On 11 May 2005 at 11:43 Jira commented:

STR-168, martin:
This requires a careful implementation:

1) A single, global, deconstructor will be used. This deconstructor should check if the blob is a set or hashtable (since there can also be other blobs). This should be based on a Set, since we can reserve a specific blob structure for hashtable or sets.

2) The blob might already be destroyed by hand, so destroy needs to be changed to remove the blob from the set of blobs that have to deconstructed. In the mean-time, the deconstructor should not be applied.

3) Destruction by hand should always be done using the single destruction primitive.


On 28 July 2005 at 13:07 Jira commented:

STR-168, martin:
ATerm destructors are not per term.


On 2 July 2006 at 02:41 Jira commented:

STR-168, martin:
This getting more and more important. We need to find a solution.


On 2 July 2006 at 02:49 Jira commented:

STR-168, martin:
A possible solution could be to make every blob a composition of two pointers: the actual pointer and the blob specific desctructor, a function pointer.

This would allow a single, global, blob destructor that can invoke the blob specific destructors.


On 11 July 2008 at 10:32 Jira commented:

STR-168, pierron:
There is a patch for the ATerm library to handle destructor with the blob declaration.

http://bugzilla.sen.cwi.nl:8080/show_bug.cgi?id=651

which provide the following function (macro):
ATmakeDestructableBlob(size, data, dtor)

By the way, this patch will also solve the limited number of destructor that can be registered in the ATerm library.


On 9 January 2013 at 16:56 Eelco Visser removed tag 0.19M1

On 9 January 2013 at 16:56 Eelco Visser tagged interesting

Log in to post comments