MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / ~gc_node

Method ~gc_node

src/misc/gc_node.cpp:226–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224 }
225
226 gc_node::~gc_node() {
227 gc_check_break(gc_id);
228 if ( gc_owner ) {
229 // Node is being deleted outside of gc_sweep.
230 // During the migration period, this can happen legitimately when old code
231 // paths delete TypeDecl. In DAS_GC_DEBUG mode, assert to catch bugs.
232#if DAS_GC_DEBUG
233 if ( !gc_owner->gc_collecting ) {
234 DAS_FATAL_LOG("gc_node id=%" PRIu64 " deleted outside of gc_sweep\n", gc_id);
235 DAS_ASSERTF(false, "gc_node id=%" PRIu64 " deleted outside of gc_sweep", gc_id);
236 }
237#endif
238 gc_owner->gc_unlink(this);
239 }
240 if ( gc_is_alive() ) {
241 gc_magic = GC_MAGIC_DEAD;
242 }
243 }
244
245 void gc_node::gc_unlink() {
246 if ( gc_owner ) {

Callers 1

gc_sweepMethod · 0.80

Calls 3

gc_check_breakFunction · 0.85
gc_is_aliveFunction · 0.85
gc_unlinkMethod · 0.80

Tested by

no test coverage detected