Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
ObjectSpace.trace_object_allocations_debug_start
() -> void
trace_object_allocations_debug_start
ext/objspace/object_tracing.c
View on GitHub ↗
static VALUE
trace_object_allocations_debug_start(VALUE self)
{
tmp_keep_remains = 1;
if (object_allocations_reporter_registered == 0) {
object_allocations_reporter_registered = 1;
rb_bug_reporter_add(object_allocations_reporter, 0);
}
return trace_object_allocations_start(self);
}
Starts tracing object allocations for GC debugging. If you encounter the BUG “… is T_NONE” (and so on) on your application, please try this method at the beginning of your app.
See also
.trace_object_allocations_clear
.trace_object_allocations_start
.trace_object_allocations
.trace_object_allocations_stop
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0