From b4796b63763b08f13aa77f51f679d0b660bf48a4 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Fri, 11 May 2001 19:41:27 +0000 Subject: component_new refs the object itself, so unref ours when we finish with it 2001-05-11 JP Rosevear * e-component-registry.c (register_component): component_new refs the object itself, so unref ours when we finish with it * e-shell.c (e_shell_construct): There is no need to explicitly ref the folder type registry, storage set and shortcuts because we are the creator and hold the initial ref count of 1. svn path=/trunk/; revision=9766 --- shell/ChangeLog | 9 +++++++++ shell/e-component-registry.c | 3 ++- shell/e-shell.c | 5 ----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index d459665e72..54912d89db 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,12 @@ +2001-05-11 JP Rosevear + + * e-component-registry.c (register_component): component_new refs + the object itself, so unref ours when we finish with it + + * e-shell.c (e_shell_construct): There is no need to explicitly + ref the folder type registry, storage set and shortcuts because we + are the creator and hold the initial ref count of 1. + 2001-05-11 Dan Winship * e-local-storage.c (load_folder): Lots of people seem to have diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index f316c3fbf2..2106432a78 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -177,7 +177,8 @@ register_component (EComponentRegistry *component_registry, component = component_new (id, client); g_hash_table_insert (priv->component_id_to_component, component->id, component); - + bonobo_object_unref (BONOBO_OBJECT (client)); + for (i = 0; i < supported_types->_length; i++) { const GNOME_Evolution_FolderType *type; diff --git a/shell/e-shell.c b/shell/e-shell.c index e94b1e2cbe..4dc33de06d 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -764,9 +764,6 @@ e_shell_construct (EShell *shell, priv->folder_type_registry = e_folder_type_registry_new (); priv->storage_set = e_storage_set_new (shell->priv->folder_type_registry); - gtk_object_ref (GTK_OBJECT (priv->folder_type_registry)); - gtk_object_ref (GTK_OBJECT (priv->storage_set)); - /* CORBA storages must be set up before the components, because otherwise components cannot register their own storages. */ if (! setup_corba_storages (shell)) @@ -794,8 +791,6 @@ e_shell_construct (EShell *shell, if (priv->shortcuts == NULL) g_warning ("Cannot load shortcuts -- %s", shortcut_path); - else - gtk_object_ref (GTK_OBJECT (priv->shortcuts)); g_free (shortcut_path); -- cgit v1.2.3