summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtengine.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-04 15:43:59 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-04 15:43:59 -0700
commitcddf8253692d3beaa97a502c8b60c1d18f81664a (patch)
treebaa5b2456a1bdfec97fa97be2ef07eb3295a82d7 /xfa/fde/cfde_txtedtengine.h
parent32e693fe13105fab5baf81b334e932fce62d89b5 (diff)
downloadpdfium-cddf8253692d3beaa97a502c8b60c1d18f81664a.tar.xz
Use smart pointers for class owned pointers under xfa/fde
Use smart pointer to replace raw pointer type for class owned member variables so that memory management will be easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2208423002
Diffstat (limited to 'xfa/fde/cfde_txtedtengine.h')
-rw-r--r--xfa/fde/cfde_txtedtengine.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index 4bafce6864..974913936f 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -7,6 +7,8 @@
#ifndef XFA_FDE_CFDE_TXTEDTENGINE_H_
#define XFA_FDE_CFDE_TXTEDTENGINE_H_
+#include <memory>
+
#include "xfa/fde/ifde_txtedtengine.h"
class CFDE_TxtEdtBuf;
@@ -150,8 +152,8 @@ class CFDE_TxtEdtEngine {
FX_BOOL IsSelect();
void DeleteSelect();
- CFDE_TxtEdtBuf* m_pTxtBuf;
- CFX_TxtBreak* m_pTextBreak;
+ std::unique_ptr<CFDE_TxtEdtBuf> m_pTxtBuf;
+ std::unique_ptr<CFX_TxtBreak> m_pTextBreak;
FDE_TXTEDTPARAMS m_Param;
CFX_ArrayTemplate<IFDE_TxtEdtPage*> m_PagePtrArray;
CFX_ArrayTemplate<CFDE_TxtEdtParag*> m_ParagPtrArray;