destroy all signals that the finalized obejct type introduced.

Wed Nov  1 03:36:54 2000  Tim Janik  <timj@gtk.org>

        * gobject.c (g_object_base_class_finalize): destroy all signals that
        the finalized obejct type introduced.

        * gsignal.c (g_signals_destroy): don't require itype to have
        signals.

        * gobject.c (g_object_do_finalize): make sure all signal handlers
        are destroyed.

        * gsignal.[hc]:
        (g_signal_handler_find): only match on non-0 masks.
        (g_signal_handlers_block_matched):
        (g_signal_handlers_unblock_matched):
        (g_signal_handlers_disconnect_matched): new functions to block/unblock
        or disconnect handlers in groups.
This commit is contained in:
Tim Janik
2000-11-01 03:03:04 +00:00
committed by Tim Janik
parent b6eb9a2e7d
commit cfe0780d3e
6 changed files with 430 additions and 179 deletions

View File

@@ -16,11 +16,12 @@
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <string.h>
#include "gobject.h"
#include "gvaluecollector.h"
#include "gsignal.h"
#include <string.h>
#define DEBUG_OBJECTS
@@ -162,6 +163,8 @@ g_object_base_class_finalize (GObjectClass *class)
guint i;
g_message ("finallizing base class of %s", G_OBJECT_CLASS_NAME (class));
g_signals_destroy (G_OBJECT_CLASS_TYPE (class));
for (i = 0; i < class->n_param_specs; i++)
{
@@ -292,6 +295,7 @@ g_object_do_shutdown (GObject *object)
static void
g_object_do_finalize (GObject *object)
{
g_signal_handlers_destroy (object);
g_datalist_clear (&object->qdata);
#ifdef DEBUG_OBJECTS