-
At which points in a program does Ruby take control over mrb_values created in C ? If I just create an object, and don't return it to ruby somehow, it wont be freed by Ruby, so I need to free it myself. I find it tricky to create a strategy around objects created in native. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The objects created by |
Beta Was this translation helpful? Give feedback.
The objects created by
mrb_obj_alloc()
directly or indirectly are all managed by GC. When they are allocated they are also referenced fromGC arena
, which keeps object reference until C function terminates. See doc/guides/gc-arena-howto.md