[Libreoffice-commits] core.git: vcl/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 14 10:12:19 UTC 2019
vcl/source/gdi/pdfwriter.cxx | 1 +
vcl/source/gdi/pdfwriter_impl.cxx | 1 +
2 files changed, 2 insertions(+)
New commits:
commit 4dd87ccdab80eb094cede538e3d742148df3880a
Author: Jan-Marek Glogowski <jan-marek.glogowski at extern.cib.de>
AuthorDate: Wed Nov 13 03:45:38 2019 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Nov 14 11:11:12 2019 +0100
tdf#128434 really free the VclPtr<PDFWriterImpl>
This fixes the major reference cycle introduced by my commit
b85ff98383942360901b8242cf77366782400426 ("Change PDFWriterImpl
into an OutputDevice"), and adds the missing disposeAndClear()
call.
Maybe it would be better to add a ScopedVclPtr in the PDFWriter
class and revert all the other VclPtr<PDFWriterImpl> users back
to the original PDFWriterImpl*. The PDFWriter code really
doesn't need any of the special VclPtr handling.
Change-Id: Ia64fb207ad274d9323e350022f6b8af35c44e9f5
Reviewed-on: https://gerrit.libreoffice.org/82562
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 4e5a3c14e6a8..9a418917cf26 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -34,6 +34,7 @@ PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& rContext, const css::un
PDFWriter::~PDFWriter()
{
+ xImplementation.disposeAndClear();
}
OutputDevice* PDFWriter::GetReferenceDevice()
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a63a2152e6b7..83d5c75bc912 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1418,6 +1418,7 @@ void PDFWriterImpl::dispose()
{
if( m_aCipher )
rtl_cipher_destroyARCFOUR( m_aCipher );
+ m_aPages.clear();
VirtualDevice::dispose();
}
More information about the Libreoffice-commits
mailing list