From cddf8253692d3beaa97a502c8b60c1d18f81664a Mon Sep 17 00:00:00 2001 From: weili Date: Thu, 4 Aug 2016 15:43:59 -0700 Subject: 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 --- xfa/fde/cfde_txtedtbuf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xfa/fde/cfde_txtedtbuf.h') diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h index e871ed9aed..baf67cef00 100644 --- a/xfa/fde/cfde_txtedtbuf.h +++ b/xfa/fde/cfde_txtedtbuf.h @@ -7,6 +7,8 @@ #ifndef XFA_FDE_CFDE_TXTEDTBUF_H_ #define XFA_FDE_CFDE_TXTEDTBUF_H_ +#include + #include "core/fxcrt/include/fx_basic.h" #include "core/fxcrt/include/fx_system.h" @@ -55,7 +57,7 @@ class CFDE_TxtEdtBuf { int32_t m_nTotal; FX_BOOL m_bChanged; CFX_ArrayTemplate m_Chunks; - IFX_MemoryAllocator* m_pAllocator; + std::unique_ptr m_pAllocator; }; #endif // XFA_FDE_CFDE_TXTEDTBUF_H_ -- cgit v1.2.3