| 39 | } |
| 40 | |
| 41 | void gc_root::gc_link ( gc_node * node ) { |
| 42 | DAS_ASSERT(node && "gc_link: null node"); |
| 43 | DAS_ASSERT(node->gc_owner == nullptr && "gc_link: node already on a root"); |
| 44 | // gc_check_break(node->gc_id); |
| 45 | node->gc_owner = this; |
| 46 | node->gc_prev = gc_last; |
| 47 | node->gc_next = nullptr; |
| 48 | if ( gc_last ) { |
| 49 | gc_last->gc_next = node; |
| 50 | } else { |
| 51 | gc_first = node; |
| 52 | } |
| 53 | gc_last = node; |
| 54 | gc_count++; |
| 55 | } |
| 56 | |
| 57 | void gc_root::gc_unlink ( gc_node * node ) { |
| 58 | DAS_ASSERT(node && "gc_unlink: null node"); |
no outgoing calls
no test coverage detected