|
From: | Zhu Zihao |
Subject: | Weak reference facility in Emacs. |
Date: | Wed, 22 Jan 2020 22:11:02 +0800 |
User-agent: | Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/28.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Weak reference is good idea to deal with cycle reference. Though Emacs has GC, but weak reference is also useful when I want to use RAII pattern in Emacs (via finalizer). hash table has option to make reference in it become weak. But it's not so convenience if user just want a weak reference of *ONE* lisp object. Would you interest in some lisp library to wrap a weak table to provide weak referenece utils. Or it's better to implement it in alloc.c?
[Prev in Thread] | Current Thread | [Next in Thread] |