diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-09-26 16:09:07 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-09-29 00:18:55 +0900 |
| commit | 473b7d0efd210290d1093201254fa32b5473d5d1 (patch) | |
| tree | 840fcced6dafbf87df7c883bb155196b91e96a93 /src/gc.c | |
| parent | 7b01b969f55b9666068104cde3c6c53106ba8080 (diff) | |
| download | mruby-473b7d0efd210290d1093201254fa32b5473d5d1.tar.gz mruby-473b7d0efd210290d1093201254fa32b5473d5d1.zip | |
Cut links from `irep` in heaps finalization.
Diffstat (limited to 'src/gc.c')
| -rw-r--r-- | src/gc.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -817,7 +817,11 @@ obj_free(mrb_state *mrb, struct RBasic *obj, int end) struct RProc *p = (struct RProc*)obj; if (!MRB_PROC_CFUNC_P(p) && p->body.irep) { - mrb_irep_decref(mrb, p->body.irep); + mrb_irep *irep = p->body.irep; + if (end) { + mrb_irep_cutref(mrb, irep); + } + mrb_irep_decref(mrb, irep); } } break; |
