diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2014-12-16 00:07:08 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2014-12-16 00:07:08 +0100 |
commit | 8b2ae6c796cf56bce34f3d3cb355d13646fd0cb1 (patch) | |
tree | df7eee2f954ea974a6a62a5cb564e0e8ab5b86a9 | |
parent | 58c7775a76a477453fe1dcead2bd90047176df85 (diff) |
Fix memory leak, destroy page after usage
-rw-r--r-- | src/pdf/qpdfdocument.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp index 1a3a6f3..b6c04e9 100644 --- a/src/pdf/qpdfdocument.cpp +++ b/src/pdf/qpdfdocument.cpp @@ -290,6 +290,9 @@ QImage QPdfDocument::render(int page, const QSizeF &pageSize) FPDF_RenderPageBitmap(bitmap, pdfPage, 0, 0, result.width(), result.height(), 0, 0); FPDFBitmap_Destroy(bitmap); + + FPDF_ClosePage(pdfPage); + return result; } |