module

Rubellite::GC

Coordinates garbage collection between Crystal's Boehm GC and Ruby's mark-sweep GC.

Class methods

pin(obj : Object) : UInt64

Pins a Crystal object so Boehm GC will not collect it while Ruby holds a reference.

Source
register_address(val_ptr : Pointer(LibRuby::Value)) : Nil

Registers a Ruby VALUE address with the Ruby GC root set

Source
start_ruby_gc

Explicitly triggers Ruby GC cycle

Source
unpin(id : UInt64) : Nil

Unpins a Crystal object when Ruby's GC finalizes the wrapper.

Source
unregister_address(val_ptr : Pointer(LibRuby::Value)) : Nil

Unregisters a Ruby VALUE address from the Ruby GC root set

Source