Ticket #1202 (new defect)

Opened 7 years ago

Any "IO Pixbuf" will cause memory leak.

Reported by: guest Owned by: somebody
Priority: normal Milestone: 0.11.0
Component: general (Gtk+, Glib) Version: 0.11.0
Keywords: pixbuf Cc: lazycat.manatee@…


Now every function return "IO Pixbuf" will cause memory leak.

I attach a simple demo to recur this issue:

module Main where

import Graphics.UI.Gtk import Graphics.UI.Gtk.Gdk.Pixbuf import Control.Monad

main = do


w <- windowNew

pb <- pixbufNew ColorspaceRgb? False 8 1000 1000

forM_ [1..100] $ \_ -> do

pixbufScaleSimple pb 1000 1000 InterpNearest? return ()

onDestroy w mainQuit widgetShowAll w mainGUI

not just pixbufScaleSimple, other function like pixbufNewFromFile, pixbufRotateSimple has same problem.

We should think why Pixbuf's are not GC'd with the normal mechanism.

Note: See TracTickets for help on using tickets.