Thanks for the tip Bil! Good to know also about the reasoning behind this behaviour.
By paying a (belated) visit to the documentation I also saw the "Don't forget to GC-protect the let!"... It just seemed obvious to me that it would be protected. But either manually protecting it, or storing it somewhere -causing it to be protected- makes much sense. Thanks again, and happy holidays! On Mon, 20 Dec 2021 at 17:11, <[email protected]> wrote: > > You need to gc protect the methods -- c_object_set_let > does not do that. This is partly for speed and to save > space in the gc-protected-objects list, and also because > you might create the let holding the methods, then > any amount of time might go by before you make an > object, so the let has to be gc-protected anyway. > g_block_methods in s7test.scm is an example where > each block can be considered an instance of the > g_block class, and the let is protected once. > _______________________________________________ Cmdist mailing list [email protected] https://cm-mail.stanford.edu/mailman/listinfo/cmdist
