10 std::set
<item
*>* gc_items
;
15 if(!gc_items
) gc_items
= new std::set
<item
*>;
16 gc_items
->insert(this);
22 gc_items
->erase(this);
25 void item::mark_root()
30 void item::unmark_root()
32 if(root_count
) root_count
--;
38 for(auto i
: *gc_items
)
40 for(auto i
: *gc_items
) {
45 for(auto i
= gc_items
->begin(); i
!= gc_items
->end();) {
46 if(!(*i
)->reachable
) {
57 bool was_reachable
= reachable
;