Skip to content

Commit

Permalink
Adds preserve to signal created by manipulate
Browse files Browse the repository at this point in the history
Stops issues with manipulate signals being garbage collected when they go out of scope.
Fixes JuliaGizmos#115
  • Loading branch information
JobJob committed Nov 9, 2016
1 parent 522151c commit e1259f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manipulate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1259f1

Please sign in to comment.