From e1259f15750b4d5b10bba776d96e21caf4dd33bc Mon Sep 17 00:00:00 2001 From: Joel Mason Date: Fri, 4 Nov 2016 23:31:50 +1100 Subject: [PATCH] Adds preserve to signal created by manipulate Stops issues with manipulate signals being garbage collected when they go out of scope. Fixes #115 --- src/manipulate.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manipulate.jl b/src/manipulate.jl index 948df64..d310ac3 100644 --- a/src/manipulate.jl +++ b/src/manipulate.jl @@ -16,7 +16,7 @@ end function map_block(block, symbols) lambda = Expr(:(->), Expr(:tuple, symbols...), block) - :(map($lambda, $(map(s->:(signal($s)), symbols)...), typ=Any)) + :(preserve(map($lambda, $(map(s->:(signal($s)), symbols)...), typ=Any))) end function symbols(bindings)