[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What happens with overlays when their buffer is killed?
From: |
Stefan Monnier |
Subject: |
Re: What happens with overlays when their buffer is killed? |
Date: |
Mon, 26 Mar 2018 13:55:06 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> assume that I create a few overlays in some buffer, and then I kill that
> buffer. What happens with the overlays?
When a buffer is killed, all the markers (and overlays) it holds are
"deleted" (aka moved so they point to any buffer any more). This is
equivalent to calling `delete-overlay` for overlays (and set-marker
with a nil value for markers).
> If they were not assigned to a variable, do they get
> garbage collected?
Yes.
Stefan