[ << Programming work ] | [Top][Contents][Index][ ? ] | [ Release work >> ] | ||
[ < Translation process ] | [ Up : Engraver tutorial ] | [ Listening to music events > ] |
10.11.3 Preventing garbage collection for SCM member variables
In certain cases, an engraver might need to ensure private Scheme
variables (with type SCM) do not get swept away by Guile’s garbage
collector: for example, a cache of the previous key signature which
must persist between timesteps. The method
virtual derived_mark () const
can be used in such cases:
Engraver_name::derived_mark () { scm_gc_mark (private_scm_member_) }
[ << Programming work ] | [Top][Contents][Index][ ? ] | [ Release work >> ] | ||
[ < Translation process ] | [ Up : Engraver tutorial ] | [ Listening to music events > ] |