unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Weak reference facility in Emacs.
@ 2020-01-22 14:11 Zhu Zihao
  2020-01-23 17:59 ` John Wiegley
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Zihao @ 2020-01-22 14:11 UTC (permalink / raw)
  To: emacs-devel

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?




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-23 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 14:11 Weak reference facility in Emacs Zhu Zihao
2020-01-23 17:59 ` John Wiegley

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).