code example attached !?
-- | Almost copied&pasted from:
-- http://hackage.haskell.org/trac/gtk2hs/ticket/1202
module Main where
import Graphics.UI.Gtk
import System.Mem (performGC)
main :: IO ()
main = do
initGUI
w <- windowNew
pb <- pixbufNew ColorspaceRgb False 8 1000 1000
timeoutAdd (testPixbuf pb) (1*1000) -- every second
onDestroy w mainQuit
widgetShowAll w
mainGUI
where testPixbuf :: Pixbuf -> IO Bool
testPixbuf pb = do
putStrLn "new pixbuf"
pixbufScaleSimple pb 1000 1000 InterpNearest
-- comment performGC and compile without '-threaded'
-- to cause a memory leak
performGC
return True -- Loop
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel