From: Marco Pesenti Gritti Date: Tue, 31 May 2005 16:51:22 +0000 (+0000) Subject: Release the poppler document on dispose X-Git-Tag: EVINCE_0_3_3~303 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=593bf8b52b5551f807ce1e7401f5a84b8a2a7cf3;p=evince.git Release the poppler document on dispose 2005-05-31 Marco Pesenti Gritti * pdf/ev-poppler.cc: Release the poppler document on dispose --- diff --git a/ChangeLog b/ChangeLog index 8e47d00a..a2f40285 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-05-31 Marco Pesenti Gritti + + * pdf/ev-poppler.cc: + + Release the poppler document on dispose + 2005-05-31 Marco Pesenti Gritti * shell/ev-view.c: (ev_view_set_document): diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc index dbc81d2d..9cb15348 100644 --- a/pdf/ev-poppler.cc +++ b/pdf/ev-poppler.cc @@ -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