mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
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:
parent
38342b3805
commit
c68d0a6c18
7 changed files with 128 additions and 137 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue