From 79e4b347761c3cd897f2e9ed0ee7e25231ae49f3 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 1 May 2000 20:58:15 +0000 Subject: Add back in the CORBA_Object_release. 2000-05-01 Christopher James Lahey * backend/pas/pas-book-factory.c: Add back in the CORBA_Object_release. * backend/pas/pas-book.c: Properly duplicate and release the listener passed to us. svn path=/trunk/; revision=2720 --- addressbook/backend/pas/pas-book.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'addressbook/backend/pas/pas-book.c') diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c index d6e9ff55ac..2601d3d9d0 100644 --- a/addressbook/backend/pas/pas-book.c +++ b/addressbook/backend/pas/pas-book.c @@ -487,6 +487,14 @@ pas_book_construct (PASBook *book, bonobo_object_construct (BONOBO_OBJECT (book), obj); + CORBA_exception_init (&ev); + book->priv->listener = CORBA_Object_duplicate (listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("pas_book_construct(): could not duplicate the listener"); + + CORBA_exception_free (&ev); + book->priv->listener = listener; book->priv->get_vcard = get_vcard; book->priv->backend = backend; @@ -523,6 +531,7 @@ pas_book_destroy (GtkObject *object) { PASBook *book = PAS_BOOK (object); GList *l; + CORBA_Environment ev; for (l = book->priv->request_queue; l != NULL; l = l->next) { PASRequest *req = l->data; @@ -533,6 +542,14 @@ pas_book_destroy (GtkObject *object) } g_list_free (book->priv->request_queue); + CORBA_exception_init (&ev); + CORBA_Object_release (book->priv->listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + g_message ("pas_book_construct(): could not release the listener"); + + CORBA_exception_free (&ev); + g_free (book->priv); GTK_OBJECT_CLASS (pas_book_parent_class)->destroy (object); -- cgit v1.2.3