Hi list,
I made a tiny "time bomb" app with Shoes.
But after runnning it for a few hours, the shoes process is eating and
consuming lots of memory until it crash and vanish :(
Shoes.app :height => 100, :width => 350 do
stack :margin => 10 do
counter = Counter.new(Time.parse("05/30/2008 17:30"))
animate(100) do
clear do
background black
stack do
style = {:align => "center", :stroke => white}
counter.update
para "Tic Tac...", style
label = strong(counter.left) if(counter.time_left > 0)
label = strong("Boom!") if(counter.time_left <= 0)
para label, style
end # stack
end # clear
end # animate
end
end
= Environment:
Windows XP
>ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
shoes-0.r396-curious.exe
Any ideas ?
A simplify version (no counter) but still doing memory leaks:
http://benjamin.francisoud.googlepages.com/empty_time_bomb.rb
The complete source code:
http://benjamin.francisoud.googlepages.com/time_bomb.rb
My blog post about Shoes:
http://rubyscube.blogspot.com/2008/04/tictac-shoes.html
thanks
--
Benjamin Francisoud
http://rubyscube.blogspot.com