Do not call mrb_mc_clear_by_class at mrb finalization.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-08-06 10:47:15 +09:00
parent 425b142168
commit a733c6e0ea
+4 -2
View File
@@ -811,12 +811,14 @@ obj_free(mrb_state *mrb, struct RBasic *obj, int end)
case MRB_TT_SCLASS:
mrb_gc_free_mt(mrb, (struct RClass*)obj);
mrb_gc_free_iv(mrb, (struct RObject*)obj);
mrb_mc_clear_by_class(mrb, (struct RClass*)obj);
if (!end)
mrb_mc_clear_by_class(mrb, (struct RClass*)obj);
break;
case MRB_TT_ICLASS:
if (MRB_FLAG_TEST(obj, MRB_FL_CLASS_IS_ORIGIN))
mrb_gc_free_mt(mrb, (struct RClass*)obj);
mrb_mc_clear_by_class(mrb, (struct RClass*)obj);
if (!end)
mrb_mc_clear_by_class(mrb, (struct RClass*)obj);
break;
case MRB_TT_ENV:
{