Disallow creation of nested tracking scopes

This commit is contained in:
aaron 2023-09-25 11:44:24 +01:00
parent c0c2166edf
commit 38342b3805
6 changed files with 256 additions and 109 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, false)
local node = create_node(false, "owner")
refs[node] = true -- prevent gc of root node