module
Rubellite::GC
Overview
Coordinates garbage collection between Crystal's Boehm GC and Ruby's mark-sweep GC.
Defined in:
rubellite/gc.crClass Method Summary
-
.pin(obj : Object) : UInt64
Pins a Crystal object so Boehm GC will not collect it while Ruby holds a reference.
-
.register_address(val_ptr : Pointer(LibRuby::Value)) : Nil
Registers a Ruby VALUE address with the Ruby GC root set
-
.start_ruby_gc : Nil
Explicitly triggers Ruby GC cycle
-
.unpin(id : UInt64) : Nil
Unpins a Crystal object when Ruby's GC finalizes the wrapper.
-
.unregister_address(val_ptr : Pointer(LibRuby::Value)) : Nil
Unregisters a Ruby VALUE address from the Ruby GC root set
Class Method Detail
def self.pin(obj : Object) : UInt64
#
Pins a Crystal object so Boehm GC will not collect it while Ruby holds a reference.
Registers a Ruby VALUE address with the Ruby GC root set
Unpins a Crystal object when Ruby's GC finalizes the wrapper.
Unregisters a Ruby VALUE address from the Ruby GC root set