[Gd-hackers] Suggested patch for Open Dylan's C runtime
Thomas Christian Chust
chust at web.de
Tue Jul 31 14:56:19 CEST 2007
Bruce Hoult wrote:
> On 7/31/07, Thomas Christian Chust <chust at web.de> wrote:
>
>> Thomas Christian Chust wrote:
>>
>>> Bruce Hoult wrote:
>>>
>>>> You could allocate the list link for the object at the point that you
>>>> register the finalizer for it
>>
>> I guess I shouldn't hack such stuff together when in a hurry. A much
>> easier solution which also avoid allocation inside the finalization
>> procedure is possible by simply using the data argument to that
>> procedure to supply a preallocated cons cell.
>
> Right. :-) Looks good provided that link object won't get GC'd in the meantime.
But if that happened, I would consider it a bug in the garbage
collector. I my eyes, being the fixed parameter to a registered callback
fully qualifies an object as being alive.
cu,
Thomas
More information about the hackers
mailing list