[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Context_handle
From: |
Han-Wen Nienhuys |
Subject: |
Re: Context_handle |
Date: |
Mon, 9 Jul 2018 14:55:18 +0200 |
Things happen when contexts go out of scope (eg. end of staff), so it
should happen deterministically.
On Sun, Jul 8, 2018 at 8:12 PM David Kastrup <address@hidden> wrote:
> Dan Eble <address@hidden> writes:
>
> > What is the purpose of Context_handle? It looks like a scoped
> > contribution to a reference count until the destructor:
> >
> >> Context_handle::~Context_handle ()
> >> {
> >> /*
> >> Don't do
> >> if (outlet_)
> >> down ();
> >> with GC, this is asynchronous.
> >> */
> >> }
> >
> > I can understand garbage collection, and I can imagine coordinating
> > garbage collection with reference counting, but coordinating garbage
> > collection with leaky reference counting is hard to appreciate.
>
> I think it's for providing a definite point of time for running the
> finishing hooks of a context's iterators and making the context
> unavailable for \context ... [= ...] continuations.
>
> Garbage collection is not determinate.
>
> I might be mistaken.
>
> --
> David Kastrup
>
> _______________________________________________
> lilypond-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-devel
>
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen