[trivial-garbage-devel] Finalize with closure

Luís Oliveira loliveira at common-lisp.net
Sun Dec 9 21:51:42 UTC 2012


On Sat, Dec 8, 2012 at 10:57 PM, Hans Höglund <hans at hanshoglund.se> wrote:
> I found myself wanting to reference the finalized object from a finalizer, so I added this wrapper around trivial-garbage:finalize, using a weak pointer to avoid permanently referencing the object from the finalizer closure.

Which Lisp are you using. IIRC, some (most?) Lisps run finalizers
/after/ the object's memory is reclaimed, in which case the weak
pointer will be null.

-- 
Luís Oliveira
http://r42.eu/~luis/




More information about the trivial-garbage-devel mailing list