On Sat, Dec 8, 2012 at 10:57 PM, Hans Höglund hans@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.