Nicolas Goaziou <m...@nicolasgoaziou.fr> 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.