1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-18 08:23:59 +00:00

Fixed circular references impacting GC

This commit is contained in:
Bryan Roe
2021-03-11 11:17:39 -08:00
parent 8f6bb1a527
commit d1e1d67a88
7 changed files with 334 additions and 67 deletions

View File

@@ -99915,3 +99915,14 @@ duk_int_t* _get_refcount_ptr(void *thr, duk_idx_t idx)
duk_heaphdr *h = (DUK_TVAL_IS_HEAP_ALLOCATED(tv) ? DUK_TVAL_GET_HEAPHDR(tv) : NULL);
return(&(DUK_HEAPHDR_GET_REFCOUNT(h)));
}
void* _duk_get_first_object(void *ctx)
{
duk_hthread *thr = (duk_hthread*)ctx;
return(thr->heap->heap_allocated);
}
void* _duk_get_next_object(void *ctx, void *heapptr)
{
duk_hthread *thr = (duk_hthread*)ctx;
return(DUK_HEAPHDR_GET_NEXT(thr->heap, ((duk_heaphdr*)heapptr)));
}