Function magnus::gc::mark_movable
source · [−]Available on
ruby_gte_2_7
only.Expand description
Mark an Object and let Ruby know it is moveable.
The Value
type is effectly a pointer to a Ruby object. Ruby’s garbage
collector will avoid moving objects exposed to extensions, unless you use
this function to mark them during the GC marking phase.
Used to mark any stored Ruby objects when implementing
DataTypeFunctions::mark
and you have also implemented
DataTypeFunctions::compact
.
Beware that any Ruby object passed to this function may later become
invalid to use from Rust when GC is run, you must update any stored objects
with location
inside your implementation of
DataTypeFunctions::compact
.