From d54a6e8b9b7220811707aa6592a0d6d879451db0 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 27 Aug 1999 12:38:31 +0000 Subject: [PATCH] Attempts at cleaning up component destruction - failed :-( --- pdf/xpdf/ChangeLog | 12 ++++++++++++ pdf/xpdf/gpdf.cc | 22 +++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/pdf/xpdf/ChangeLog b/pdf/xpdf/ChangeLog index fc09c893..d05f1a7b 100644 --- a/pdf/xpdf/ChangeLog +++ b/pdf/xpdf/ChangeLog @@ -1,3 +1,15 @@ +1999-08-27 Michael Meeks + + * bonobo-application-x-pdf.cc: Remove count of embeddable + servers: seems to be handled inside Bonobo now. + +1999-08-26 Michael Meeks + + * gpdf.cc (component_destroy): Improved clean up. + + * bonobo-application-x-pdf.cc (bed_free_data): Expand, and + clean; remove redundant pdf_stream delete. + 1999-08-24 Michael Meeks * application-x-pdf.gnorba: Update to new mime type. diff --git a/pdf/xpdf/gpdf.cc b/pdf/xpdf/gpdf.cc index ea3d3407..0db774b6 100644 --- a/pdf/xpdf/gpdf.cc +++ b/pdf/xpdf/gpdf.cc @@ -255,14 +255,34 @@ extern "C" { gtk_widget_destroy (GTK_WIDGET (fsel)); } + static void + component_destroy (Component *component) + { + CORBA_Environment ev; + g_return_if_fail (component != NULL); + + CORBA_exception_init (&ev); + + if (component->server) + GNOME_Unknown_unref ( + gnome_object_corba_objref (GNOME_OBJECT (component->server)), &ev); + component->server = NULL; + + CORBA_exception_free (&ev); + } + static void container_destroy (Container *cont) { containers = g_list_remove (containers, cont); if (cont->app) gtk_widget_destroy (cont->app); + + if (cont->component) + component_destroy (cont->component); + cont->component = NULL; + cont->app = NULL; - /* FIXME: Some serious resource freeing needs to be here */ g_free (cont); if (!containers) -- 2.43.5