all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Garbage collect and buffer-undo-list
@ 2021-03-13 18:17 Yuan Fu
  2021-03-13 19:01 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Yuan Fu @ 2021-03-13 18:17 UTC (permalink / raw)
  To: emacs-devel

I know the garbage collector trims buffer-undo-list. Does it collect the cons cell if there are other references to that object (other than buffer-undo-list)?

I tried this:

(setq last1 (last buffer-undo-list))
(garbage-collect)

After the garbage collection, the entry referred by last1 is not in buffer-undo-list anymore, but still accessible by last1. That seems to support my theory.

Yuan




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

end of thread, other threads:[~2021-03-13 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-13 18:17 Garbage collect and buffer-undo-list Yuan Fu
2021-03-13 19:01 ` Stefan Monnier
2021-03-13 19:16   ` Yuan Fu

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.