From: Yuan Fu <casouri@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Garbage collect and buffer-undo-list
Date: Sat, 13 Mar 2021 13:17:28 -0500 [thread overview]
Message-ID: <24DD7B5A-CD84-4D8B-A1D9-B7E4BA77DB1A@gmail.com> (raw)
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
next reply other threads:[~2021-03-13 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-13 18:17 Yuan Fu [this message]
2021-03-13 19:01 ` Garbage collect and buffer-undo-list Stefan Monnier
2021-03-13 19:16 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24DD7B5A-CD84-4D8B-A1D9-B7E4BA77DB1A@gmail.com \
--to=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.