Hans Åberg <haber...@telia.com> writes:

>> On 23 May 2018, at 18:58, David Kastrup <d...@gnu.org> wrote:
>
>> If you bothered looking at the LilyPond code base, you'll find that _no_
>> STL containers are created containing SCM objects in the expectation
>> that they will automagically marked for garbage collection.  Any STL
>> container containing SCM objects is either locally used for existing SCM
>> objects protected elsewhere, or its containing object is SCM controlled
>> and uses mark hooks for marking the elements of the STL container during
>> garbage collection scans.  There are even mechanisms for making sure
>> that the STL containers are fully initialized before a derived class may
>> have its mark hook triggered.
>
> But scm_malloc does not use GC_malloc_uncollectable, it seems, so it
> too would require explicit markups in order to get internally in
> Guile.

Getting "internally in Guile" is done by SCM_NEWSMOB.  Cf
lily/include/smobs.hh .

-- 
David Kastrup

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to