summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_document.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index c23637e8fa..48791262ea 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -348,14 +348,13 @@ CPDF_Document::CPDF_Document(std::unique_ptr<CPDF_Parser> pParser)
m_bLinearized(false),
m_iFirstPageNo(0),
m_dwFirstPageObjNum(0),
- m_pDocPage(new CPDF_DocPageData(this)),
- m_pDocRender(new CPDF_DocRenderData(this)) {
+ m_pDocPage(pdfium::MakeUnique<CPDF_DocPageData>(this)),
+ m_pDocRender(pdfium::MakeUnique<CPDF_DocRenderData>(this)) {
if (pParser)
SetLastObjNum(m_pParser->GetLastObjNum());
}
CPDF_Document::~CPDF_Document() {
- delete m_pDocPage;
CPDF_ModuleMgr::Get()->GetPageModule()->ClearStockFont(this);
}