This patch partially fixes #1251.

With this patch, the test case in #1251 doesn't leak memory,
as long as you don't click the button too frequently. If you
click the button more frequently than 3 times a second, it will
temporarily consume a lot of memory until you stop clicking.
Also the program crashes with stack overflow if you keep clicking
the button.

I have no idea what is causing these issues.

1 patch for repository http://code.haskell.org/gtk2hs:

Tue Apr 24 07:09:20 SGT 2012  Takano Akio <al...@hyper.cx>
  * Fix a memory leak in customStoreNew (#1251)

New patches:

[Fix a memory leak in customStoreNew (#1251)
Takano Akio <al...@hyper.cx>**20120423230920
 Ignore-this: 3940fee6a1c17c2a5951a7d9f6a6573b
] hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 242
         customTreeDragSourceIface = fromMaybe dummyDragSource mDragSource,
         customTreeDragDestIface = fromMaybe dummyDragDest mDragDest }
   privPtr <- newStablePtr priv
-  liftM con $ makeNewGObject (CustomStore, objectUnref) $
+  liftM con $ wrapNewGObject (CustomStore, objectUnref) $
     gtk2hs_store_new implPtr privPtr
 
 foreign import ccall unsafe "Gtk2HsStore.h gtk2hs_store_new"

Context:

[record carefully what I'm supposed to do when it comes time to make a release
Daniel Wagner <dan...@wagner-home.com>**20120422231212
 Ignore-this: 74beca0a3c44929e5db7d03681b7e3ed
] 
[add a surface type for raw data, plus a demo program showing how to use this with SDL (code supplied by Eli Frey)
Daniel Wagner <dan...@wagner-home.com>**20120422195206
 Ignore-this: 254fd58bd2322a9fecb5449741d7a697
] 
[Add entryGet/SetBuffer functions.
adstark1...@yahoo.com**20120420133554
 Ignore-this: 5e083fd21fc5e63986fa0bae6a7d5442
] 
[Bindings for gtk_menu_item_get_label, gtk_menu_item_get_use_underline, and the associated setters.
adstark1...@yahoo.com**20120411140517
 Ignore-this: cc9d70d06e02b6ae93fe8e39daf96ea7
] 
[added pixbufNewFromData
blackredt...@gmail.com**20120320190411
 Ignore-this: e3bd65acdcad39fbe22258e53ec4ed22
] 
[Add a note on how to connect to bufferInsertText.
axel.si...@in.tum.de**20120313141311
 Ignore-this: c9a6011fbae46b14c6c18d92de9e6732
] 
[update .cabal files: bump version numbers + record which versions of GHC this has been tested with
Daniel Wagner <dan...@wagner-home.com>**20120308231332
 Ignore-this: fe46cb8791cb9fb36618f26678dc3f4a
] 
[fixes for gtk-2.12 on Windows
Daniel Wagner <dan...@wagner-home.com>**20120308101311
 Ignore-this: 5c66fd3081d3f6cdadde33ddfad2a70
] 
[Correct the name/path of the glib #include
Duncan Coutts <dun...@community.haskell.org>**20120305202045
 Ignore-this: 89a8cba1724af487f2a5bc633cb302cc
 It must be #include <glib.h> and not #include <glib-2.0/glib.h>
 This fixes the build on Windows.
] 
[do more escaping in the codegen to let this build in Windows
Daniel Wagner <dan...@wagner-home.com>**20120224020534
 Ignore-this: 3da4564c8736fdc3fa114bb96098162c
] 
[and note the "glade" requirement for these two
Daniel Wagner <dan...@wagner-home.com>**20120213171910
 Ignore-this: c34d418be4fbd7990a2eefd21d79393a
] 
[note the uzbl requirement
Daniel Wagner <dan...@wagner-home.com>**20120213171716
 Ignore-this: 32d999fd5040449834c945a4fe32c876
] 
[added widgetRestoreFg, widgetRestoreBg, widgetRestoreText, widgetRestoreBase
t...@dockerz.net**20120129213806
 Ignore-this: dc8a919c680a57799abbd1f19b40825d
 
 These new functions undo the effects of previous calls are to
 widgetModifyFg, widgetModifyBg, widgetModifyText, and
 widgetModifyBase. Whilst it may have been preferable to implement this
 behaviour by having the existing functions take a Maybe type (as this
 would be consitent with both widgetModifyFont and the underlying gtk
 API), new functions were added so as to preserve the current API.
 
] 
[update my email address
axel.si...@in.tum.de**20120208225806
 Ignore-this: 84924b7c3f735b01ed54c79e399bcebb
] 
[Fix comments.
axel.si...@in.tum.de**20120208225031
 Ignore-this: 321e8a84b0aded58637d00eee117ca6
] 
[add a boring file
Daniel Wagner <dan...@wagner-home.com>**20120129003327
 Ignore-this: dc0f7fd6a875a6ee32f5097dac468c44
] 
[switch from null-terminated string connection to (string,length) connection in bufferInsertText
Daniel Wagner <dan...@wagner-home.com>**20110610175442
 Ignore-this: 4ed4d2fee993ceb3a959efb1647affd9
] 
[Fix the type generator for GHC 7.4
Duncan Coutts <dun...@community.haskell.org>**20120120065006
 Ignore-this: e28ed526c725b8b57473ce2b8b0ebd6d
 GHC 7.4 is stricter about FFI imports with newtypes, the newtype
 constructor must be visible at the point of import.
] 
[Fix cairo for GHC 7.4
Duncan Coutts <dun...@community.haskell.org>**20120120064243
 Ignore-this: 934841cfaea0d33a579f03e527be631a
 Changes in Num type class
] 
[Fix glib for change in RTS API in GHC 7.4
Duncan Coutts <dun...@community.haskell.org>**20120120064020
 Ignore-this: a27001c378bda1249de4ecd2b94bfeaa
] 
[handle property notificaiton correctly
axel.si...@in.tum.de**20111216130816
 Ignore-this: c3fd3153e90ece000baf94b638fcbe67
] 
[Make Setup more robust when checking for installed gtk2hsC2hs. Bump version numbers of all pacckages to 0.12.2
axel.si...@in.tum.de**20111113220056
 Ignore-this: 9dd93388949b4e433ab175e3ca27b4a0
] 
[Bump version numbers
axel.si...@in.tum.de**20111113212032
 Ignore-this: d621d5510265d852ab2eb824b0d61519
] 
[inline c2hs conversion functions
axel.si...@in.tum.de**20111103074015
 Ignore-this: 74a5fc8a351707890e396a4b7305c548
] 
[Fix bug in pangoShape that always shaped the whole string passed to pangoItemize.
axel.si...@in.tum.de**20111031082433
 Ignore-this: 462a4676bc3a7a1f804ce05878119d5e
] 
[Fix Entry to build with 2.12.
axel.si...@in.tum.de**20111024151012
 Ignore-this: 54932aa12ce1664e6ca2ff20aa53dd29
] 
[Try to fix printer settings to compile with Gtk 2.12.
axel.si...@in.tum.de**20111024141939
 Ignore-this: 6c9a2eac399e4f882893297d7233a944
] 
[Make compile with glib 2.20.
axel.si...@in.tum.de**20111012131316
 Ignore-this: 7e1b3cfd8012d11316b53907bb49fe05
] 
[Haddock fixes.
axel.si...@in.tum.de**20111006063053
 Ignore-this: 217edb2f7815d8be9fb586adb0f82a73
] 
[TAG 0.12.1
Duncan Coutts <dun...@community.haskell.org>**20110912114758
 Ignore-this: 9edd3aeab3701dfaafabaaf7d819e4
] 
Patch bundle hash:
232c45aed8755186c6a758d2ebaa69ac59ba438e
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to