GNOME Bugzilla – Bug 711778
Implement GCleanup in libgobject
Last modified: 2018-05-24 15:54:15 UTC
Implement cleanup in libgmodule and associated tests. I've split this out from bug #627423 for simplicity, since there are quite a few patches. That should make it easier to review, track dependencies and so on. Goal here is to have all gobject related tests running without leaks or memory issues.
Er, this is about libgobject. Disregard typo above.
Created attachment 259424 [details] [review] gobject: Define a cleanup scope for libgobject
Created attachment 259425 [details] [review] gatomicarray: Support for cleaning up Cleanup atomic array manually as very last thing Otherwise we keep putting stuff in freelist during cleanup. Initial work by: Dan Winship <danw@gnome.org>
Created attachment 259426 [details] [review] gtype: add g_type_set_qdata_full Tweaked by: Stef Walter <stefw@redhat.com>
Created attachment 259427 [details] [review] gtype: Implement cleanup of GType Partially from patches from Ole André Vadla Ravnås, and Dan Winship There are a lot of intertwined pointer references between types, their vtables, and other bits. Free the memory for them all together. Note that we still do all finalization (ie: callbacks) per type and module, in the relevant cleanup lists.
Created attachment 259428 [details] [review] gtype: Push registered GType onto the appropriate cleanup list When G_CLEANUP_SCOPE is defined the G_DEFINE_TYPE and macros properly push newly registered GTypes onto the cleanup list. In addition push all the the basic types into the libgobject cleanup list.
Created attachment 259429 [details] [review] gobject: Cleanup GObject class stuff Initial work by: Dan Winship <danw@gnome.org>
Created attachment 259430 [details] [review] gparam: Reliably free class info initialization closure Otherwise we end up in a strange leak where static types leak unless their class has been ref'd.
Created attachment 259431 [details] [review] gtype: Remove unneeded ref of static parent type This causes a leak of the parent type.
Created attachment 259432 [details] [review] gtypemodule: Allow GTypeModule to be finalized This is used by the cleanup code.
Created attachment 259433 [details] [review] gvalue: Cleanup global static data
Created attachment 259436 [details] [review] gobject: Don't leak pspecs for ininstantiated interfaces Remove the awkward ownerhsip of pspec by the object. pspecs are now only owned by the pool, which makes things more predictable.
Created attachment 259446 [details] [review] tests/gobject: Use cleanup for types defined in tests
Created attachment 259461 [details] [review] gio: Define cleanup scope and list for libgio
Created attachment 259462 [details] [review] gdbus: Cleanup global static data
Created attachment 259463 [details] [review] gioenumtypes: Push enum GTypes onto cleanup list
Created attachment 259527 [details] [review] dynamictype: Fix leak in test
Created attachment 259529 [details] [review] param: Avoid g_test_add_data_func_full() which leaks It leaks on tests that have not been run. This is the case when the g_test_subprocess mechanics are in use.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/782.