mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
also unpin final
on weak maps
This commit is contained in:
parent
76a928bac2
commit
6749682f82
1 changed files with 2 additions and 1 deletions
3
gc.c
3
gc.c
|
@ -10135,6 +10135,7 @@ wmap_compact(void *ptr)
|
|||
struct weakmap *w = ptr;
|
||||
if (w->wmap2obj) rb_gc_update_tbl_refs(w->wmap2obj);
|
||||
if (w->obj2wmap) rb_gc_update_tbl_refs(w->obj2wmap);
|
||||
w->final = rb_gc_location(w->final);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -10144,7 +10145,7 @@ wmap_mark(void *ptr)
|
|||
#if WMAP_DELETE_DEAD_OBJECT_IN_MARK
|
||||
if (w->obj2wmap) st_foreach(w->obj2wmap, wmap_mark_map, (st_data_t)&rb_objspace);
|
||||
#endif
|
||||
rb_gc_mark(w->final);
|
||||
rb_gc_mark_no_pin(w->final);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Reference in a new issue