From 593bf8b52b5551f807ce1e7401f5a84b8a2a7cf3 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 31 May 2005 16:51:22 +0000 Subject: [PATCH] Release the poppler document on dispose 2005-05-31 Marco Pesenti Gritti * pdf/ev-poppler.cc: Release the poppler document on dispose --- ChangeLog | 6 ++++++ pdf/ev-poppler.cc | 13 +++++++++++++ 2 files changed, 19 insertions(+) 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 -- 2.43.5