[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: garbace collection of point-markers

From: Stefan Monnier <address@hidden>
Subject: Re: garbace collection of point-markers
Date: 31 Jan 2003 12:21:01 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Barry" == Barry Margolin <address@hidden> writes:
> Your test seems to show that the markers are *not* cleaned up by the GC.

They definitely should.  If they're not, it's a bug.
In the example posted by Pascal, it might simply be that the marker
is still referenced from the stack (more specifically, from a stack slot
which is actually dead, but the GC doesn't know it).

> Buffers keep track of the markers that point to them (so that they can be
> updated when the buffer is modified), and that keeps them from becoming
> garbage until the buffer is killed.  This would be an ideal application for
> "weak" references if Emacs Lisp had them, but AFAIK it doesn't.

Markers have been handled "weakly" for a long time and Emacs-21
additionally introduced weak hash tables.  So, AFAIK it does ;-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]