Hi again !

On Sat, Oct 09, 2010 at 05:10:36PM +0200, Axel Simon wrote:
> Yes, that's the notion. mainGUI must be "__safe" because it will
> call back into Haskell land. Once a callback from the mainGUI thread
> is triggered and we're in Haskell land again, GC and all other
> Haskell threads will run.
> 
> But I'm not that this explains why we see the space leak without -
> threaded. If your Haskell program does not run then it can't create
> garbage. If it runs, the GC will run.
> 
> There is some C code that might behave differently, depending on
> weather we're in -threaded mode or not. I'll check.

@Axel, sorry to bother you with another tricky question but I've
played with pixbufs in a callback glib function (code attached),
and forcing the GC with System.Mem.performGC seems to be the only
way to avoid a memory issue, when compiled without any
'-threaded' option.

I'm really puzzled by this behaviour since it shows GHC runtime
would be able to clean the heap, but will not do it unless you
explicitly ask for.


Well, anyway, as Andy asked, I will try to fix floating
references in the rest of the Gtk objects. I guess using
[0][GObject official hierarchy], hierachy.list and a smart sed
script can help me to speed things up.

[0]: http://library.gnome.org/devel/gtk/stable/ch01.html

regards,
/John

------------------------------------------------------------------------------
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

Reply via email to