We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 08eaa81 + 031785b commit b8db698Copy full SHA for b8db698
1 file changed
gc/mmtk/mmtk.c
@@ -345,7 +345,9 @@ rb_mmtk_call_obj_free(MMTk_ObjectReference object)
345
pthread_mutex_unlock(&objspace->event_hook_mutex);
346
}
347
348
- rb_gc_obj_free(objspace, obj);
+ if (RB_UNLIKELY(rb_gc_obj_needs_cleanup_p(obj))) {
349
+ rb_gc_obj_free(objspace, obj);
350
+ }
351
352
#ifdef MMTK_DEBUG
353
memset((void *)obj, 0, rb_gc_impl_obj_slot_size(obj));
0 commit comments