Skip to content

When is an object "added" to ruby (and can be GCed) ? #5468

Answered by matz
sasq64 asked this question in Q&A
Discussion options

You must be logged in to vote

The objects created by mrb_obj_alloc() directly or indirectly are all managed by GC. When they are allocated they are also referenced from GC arena, which keeps object reference until C function terminates. See doc/guides/gc-arena-howto.md

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by matz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants