[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] function for inserting a block
From: |
Adam Porter |
Subject: |
Re: [O] function for inserting a block |
Date: |
Sun, 03 Sep 2017 03:19:52 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> You need to clean these markers at the end of the function. Markers set
> to a position are never garbage-collected. Usually, it happens at the
> end of an `unwind-protect'.
Not that I oppose cleaning up markers after you're done with them, but
are they actually never collected? The manual says:
"...it is a good idea to make a marker point nowhere if you are sure you
don’t need it any more. Markers that can no longer be accessed are
eventually removed (*note Garbage Collection::)."
I asked on /r/emacs about this but never got a firm answer; some thought
that they are never collected and require manual clearing, others
thought that ones that go out-of-scope are eventually collected and that
it's not typically necessary to clear them manually. I also recall
seeing some code recently that didn't manually clear the markers it
created, so I wonder if that is true.
- [O] function for inserting a block, Eric Abrahamsen, 2017/09/02
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/09/08
- Re: [O] function for inserting a block, Nicolas Goaziou, 2017/09/10
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/09/10
- Re: [O] function for inserting a block, Nicolas Goaziou, 2017/09/29