]> www.fi.muni.cz Git - evince.git/commitdiff
Release the poppler document on dispose
authorMarco Pesenti Gritti <mpg@redhat.com>
Tue, 31 May 2005 16:51:22 +0000 (16:51 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Tue, 31 May 2005 16:51:22 +0000 (16:51 +0000)
2005-05-31  Marco Pesenti Gritti <mpg@redhat.com>

        * pdf/ev-poppler.cc:

        Release the poppler document on dispose

ChangeLog
pdf/ev-poppler.cc

index 8e47d00ac95479b92b6d04bf8bb6d3beeacca2be..a2f402851723b478db199dbdd1db70717f0a5fde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-31  Marco Pesenti Gritti <mpg@redhat.com>
+
+       * pdf/ev-poppler.cc:
+
+       Release the poppler document on dispose
+
 2005-05-31  Marco Pesenti Gritti <mpg@redhat.com>
 
        * shell/ev-view.c: (ev_view_set_document):
index dbc81d2d180e627569ec7685ed35019cf80e3adf..9cb15348736c38e653dbdf63d50085ddd54ace46 100644 (file)
@@ -87,9 +87,22 @@ G_DEFINE_TYPE_WITH_CODE (PdfDocument, pdf_document, G_TYPE_OBJECT,
                                                        pdf_document_ps_exporter_iface_init);
                         });
 
+static void
+pdf_document_dispose (GObject *object)
+{
+       PdfDocument *pdf_document = PDF_DOCUMENT(object);
+
+       if (pdf_document->document) {
+               g_object_unref (pdf_document->document);
+       }
+}
+
 static void
 pdf_document_class_init (PdfDocumentClass *klass)
 {
+       GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
+
+       g_object_class->dispose = pdf_document_dispose;
 }
 
 static void