|
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. |
Answered by
matz
Jun 3, 2021
Replies: 1 comment
|
The objects created by |
0 replies
Answer selected by
matz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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