[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using finalizers
From: |
Stefan Monnier |
Subject: |
Re: using finalizers |
Date: |
Sat, 01 Jan 2022 15:47:24 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> In Emacs Lisp, the semantics is: call this thunk when the returned
> finalizer gets collected. So, if I want to finalize my object, I have
> too keep the reference to the finalizer.
That's right: if you want an object to have a finalizer, you need to
save that finalizer somewhere inside the object.
IOW the object literally "has a finalizer" somewhere inside.
There's no doubt that it's different.
Do you have concrete cases where this difference introduces a difficulty?
Stefan