| Index: core/fpdfapi/fpdf_parser/cfdf_document.cpp
|
| diff --git a/core/fpdfapi/fpdf_parser/cfdf_document.cpp b/core/fpdfapi/fpdf_parser/cfdf_document.cpp
|
| index c602f634ad9ecd13b5c8d065bf35ecff084150b3..128c513c60e32bc0a40d6db5c0ce918ddab8757a 100644
|
| --- a/core/fpdfapi/fpdf_parser/cfdf_document.cpp
|
| +++ b/core/fpdfapi/fpdf_parser/cfdf_document.cpp
|
| @@ -14,18 +14,21 @@ CFDF_Document::CFDF_Document()
|
| : CPDF_IndirectObjectHolder(),
|
| m_pRootDict(nullptr),
|
| m_pFile(nullptr),
|
| - m_bOwnFile(FALSE) {}
|
| + m_bOwnFile(FALSE),
|
| + m_pByteStringPool(WrapUnique(new CFX_ByteStringPool)) {}
|
|
|
| CFDF_Document::~CFDF_Document() {
|
| if (m_bOwnFile && m_pFile)
|
| m_pFile->Release();
|
| + m_pByteStringPool.Clear(); // Make weak.
|
| }
|
|
|
| CFDF_Document* CFDF_Document::CreateNewDoc() {
|
| CFDF_Document* pDoc = new CFDF_Document;
|
| - pDoc->m_pRootDict = new CPDF_Dictionary;
|
| + pDoc->m_pRootDict = new CPDF_Dictionary(pDoc->GetByteStringPool());
|
| pDoc->AddIndirectObject(pDoc->m_pRootDict);
|
| - pDoc->m_pRootDict->SetFor("FDF", new CPDF_Dictionary);
|
| + pDoc->m_pRootDict->SetFor("FDF",
|
| + new CPDF_Dictionary(pDoc->GetByteStringPool()));
|
| return pDoc;
|
| }
|
|
|
|
|