Allow creation of nested tracking scopes

It turns out that handling destruction of a nested tracking scope was
not as difficult as I thought and didn't need much changes
This commit is contained in:
aaron 2023-09-25 23:37:51 +01:00
parent 38342b3805
commit c68d0a6c18
7 changed files with 128 additions and 137 deletions

View file

@ -11,7 +11,7 @@ local destroy = graph.destroy
local refs = {}
local function root<T...>(fn: (destroy: () -> ()) -> T...): T...
local node = create_node(false, "owner")
local node = create_node(false, false)
refs[node] = true -- prevent gc of root node