From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: When are unused overlays garbage collected?
Date: Wed, 26 May 2021 09:23:42 +0200 [thread overview]
Message-ID: <20210526072342.GA24307@tuxteam.de> (raw)
In-Reply-To: <875yz6drjd.fsf@mbork.pl>
[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]
On Wed, May 26, 2021 at 06:53:42AM +0200, Marcin Borkowski wrote:
>
> On 2021-05-24, at 14:27, Eli Zaretskii <eliz@gnu.org> wrote:
>
> >> From: Marcin Borkowski <mbork@mbork.pl>
> >> Date: Mon, 24 May 2021 07:00:54 +0200
> >>
> >> --8<---------------cut here---------------start------------->8---
> >> The overlay continues to exist as a Lisp object, and its property list
> >> is unchanged, but it ceases to be attached to the buffer it belonged to,
> >> and ceases to have any effect on display.
> >>
> >> A deleted overlay is not permanently disconnected. You can give it
> >> a position in a buffer again by calling ‘move-overlay’.
[...]
> But what would happen if I (delete-overlay my-overlay), then it gets
> garbage collected, and then I (move-overlay my-overlay ...)?
^^^^^^^^^^
You are still holding a reference to it. It would be an extremely
impolite action on part of the garbage collector to even look at
your overlay. I'm sure it would bring about a severe reprimand :)
Cheers
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2021-05-26 7:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 5:00 When are unused overlays garbage collected? Marcin Borkowski
2021-05-24 5:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-24 6:33 ` Marcin Borkowski
2021-05-24 12:27 ` Eli Zaretskii
2021-05-26 4:53 ` Marcin Borkowski
2021-05-26 7:23 ` tomas [this message]
2021-05-26 15:36 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-26 16:52 ` tomas
2021-05-26 12:30 ` Eli Zaretskii
2021-05-27 16:20 ` Marcin Borkowski
2021-05-27 16:41 ` Eli Zaretskii
2021-05-28 19:38 ` Marcin Borkowski
2021-05-24 17:07 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-26 5:01 ` Marcin Borkowski
2021-05-26 12:34 ` Eli Zaretskii
2021-05-27 16:23 ` Marcin Borkowski
2021-05-26 14:48 ` Stefan Monnier
2021-05-27 16:26 ` Marcin Borkowski
2021-05-27 21:42 ` Stefan Monnier
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=20210526072342.GA24307@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@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.