glib/gobject
Matthias Clasen d03d26feab [gsignal] disconnect invalidated closures
Modify gsignal to automatically disconnect a GClosure that becomes
invalid (in the g_closure_invalidate() sense).

Previously, when g_signal_connect_object() was used with a GObject as
the user_data and that object was destroyed, the handler would no longer
be called but the signal handler was itself was not disconnected (ie:
the bookkeeping data was kept around).

The main effect of this patch is that these signal handlers will now
be automatically disconnected (and fully freed).

The documentation for g_signal_connect_object() has anticipated this
change for over 10 years and has advised the following workaround when
disconnecting signal handlers connected with g_signal_connect_object():

 if (g_signal_handler_is_connected (instance, id))
   g_signal_handler_disconnect (instance, id);

If your code follows this practice then it will continue to work.

If your code never disconnects the signal handler then it was wasting
memory before (and this commit fixes that).

If your code unconditionally disconnects the signal handler then you
will start to see (harmless) g_critical() warnings about this and you
should fix them.

https://bugzilla.gnome.org/show_bug.cgi?id=118536
2012-10-08 11:21:48 -04:00
..
tests update .gitignore 2012-09-03 08:56:10 -04:00
.gitignore Stop using glib-genmarshal at build time 2011-06-20 17:24:07 -04:00
abicheck.sh Simply symbols files 2011-05-23 00:21:06 -04:00
ChangeLog Update README files to refer to git 2009-03-31 19:39:16 -04:00
gatomicarray.c Remove a redundant assertion 2011-06-14 18:51:57 -04:00
gatomicarray.h Add GAtomicArray for RCU-style lockless updates 2009-11-30 20:48:50 +01:00
gbinding.c Fix binding properties of the same object 2012-03-04 20:49:04 -05:00
gbinding.h Remove all uses of G_CONST_RETURN 2011-06-09 11:15:40 -04:00
gboxed.c Box GTimeZone to make it introspectable 2012-09-06 06:18:42 +02:00
gboxed.h Version the deprecation of g_value_array_get_type() 2012-02-29 17:56:06 +00:00
gclosure.c gclosure: do not copy and leak when generically marshalling return value 2012-08-05 12:52:38 +01:00
gclosure.h Add optional support for varargs marshallers to GClosure 2012-03-02 17:13:03 +01:00
genums.c documentation fixes 2011-12-13 23:01:51 -05:00
genums.h Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
glib-genmarshal.c Switch all open() calls to use g_open() 2012-08-28 13:56:59 -04:00
glib-mkenums.in glib-mkenums: fix handling of forward enum declarations 2012-02-07 13:32:22 -05:00
glib-types.h Box GTimeZone to make it introspectable 2012-09-06 06:18:42 +02:00
gmarshal.c Use G_VA_COPY instead of va_copy() 2012-03-08 14:51:22 +08:00
gmarshal.h Support generating va marshallers in glib-genmarshal 2012-03-02 17:13:03 +01:00
gmarshal.list Update the comment in gmarshal.list 2012-06-23 17:53:22 -04:00
gobject_probes.d Add dtrace and systemtap support for gobject 2010-05-27 14:51:41 -04:00
gobject_trace.h Add dtrace and systemtap support for gobject 2010-05-27 14:51:41 -04:00
gobject-query.c Use the right binary name in help output. Patch by Hiroyuki Ikezoe. 2008-07-06 02:01:56 +00:00
gobject.c Add an atomic compare-and-exchange operation for object data 2012-09-02 15:09:13 -04:00
gobject.h Add an atomic compare-and-exchange operation for object data 2012-09-02 15:09:13 -04:00
gobject.py Initial support for gdb python macros 2009-09-21 15:39:00 +02:00
gobject.rc.in Update the year in the *.rc.in files 2011-06-07 08:55:31 +08:00
gobject.stp.in Add dtrace and systemtap support for gobject 2010-05-27 14:51:41 -04:00
gobject.symbols Box GTimeZone to make it introspectable 2012-09-06 06:18:42 +02:00
gobjectnotifyqueue.c [notify] add warning to gobjectnotifyqueue.c 2011-11-16 17:50:13 +00:00
gparam.c It is 'registered', not 'registred' 2012-08-18 23:17:47 -04:00
gparam.h Fix malformed GTK-Doc comment blocks: don't confuse GTK-Doc parsers. 2012-04-05 10:23:45 -03:00
gparamspecs.c Deprecate GValueArray 2012-01-24 23:37:24 -05:00
gparamspecs.h Deprecate GValueArray 2012-01-24 23:37:24 -05:00
gsignal.c [gsignal] disconnect invalidated closures 2012-10-08 11:21:48 -04:00
gsignal.h Add g_signal_set_va_marshaller 2012-03-02 17:13:03 +01:00
gsourceclosure.c gobject: Use G_VALUE_INIT 2011-10-18 17:12:33 +01:00
gsourceclosure.h GObject: move GLib type definitions to a separate header 2011-05-19 17:39:33 -04:00
gtype-private.h Add _g_closure_is_void to check for NULL vfuncs 2012-03-02 17:13:03 +01:00
gtype.c Clarify g_type_init docs 2012-09-23 11:13:57 -04:00
gtype.h Constify collect and lcopy strings in GTypeValueTable 2012-07-05 23:27:35 -04:00
gtypemodule.c Do not use static GTypeInfo and GInterfaceInfo 2011-11-29 22:03:25 -05:00
gtypemodule.h docs: Fix typo in G_DEFINE_DYNAMIC_TYPE_EXTENDED example. 2012-05-04 09:31:25 +02:00
gtypeplugin.c Do not use static GTypeInfo and GInterfaceInfo 2011-11-29 22:03:25 -05:00
gtypeplugin.h Migrating docs. 2008-06-21 18:20:43 +00:00
gvalue.c gobject/gio: some last missed statics/inclues 2011-10-16 21:53:03 -04:00
gvalue.h Exterminate 'the the' 2012-08-18 23:15:58 -04:00
gvaluearray.c Add G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS 2012-02-15 09:54:38 -05:00
gvaluearray.h Version the deprecation of g_value_array_get_type() 2012-02-29 17:56:06 +00:00
gvaluecollector.h Constify collect and lcopy strings in GTypeValueTable 2012-07-05 23:27:35 -04:00
gvaluetransform.c valuetransform: Fix definition of ulong_bool 2012-06-27 10:59:29 +02:00
gvaluetypes.c values: Use v_pointer for g_value_set_gtype() 2012-01-14 01:15:16 +01:00
gvaluetypes.h use GLIB_DEPRECATED_IN_2_32_FOR to deprecate g_value_{g,s}et_schar 2012-04-03 16:46:13 +02:00
libgobject-gdb.py.in Avoid shadowing the dir builtin 2010-12-03 14:08:36 -05:00
Makefile.am build: Fix 'make dist' regression 2012-04-25 15:41:48 -04:00
makefile.msc.in gobject/: fully remove gobjectalias hacks 2010-07-07 19:40:48 -04:00
marshal-genstrings.pl Hacky script to fix up your .msc.in files on windows. Dunno if this is a 2001-08-04 15:49:55 +00:00
testgobject.c Do not use static GTypeInfo and GInterfaceInfo 2011-11-29 22:03:25 -05:00