diff options
author | weili <weili@chromium.org> | 2016-08-04 15:43:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-04 15:43:59 -0700 |
commit | cddf8253692d3beaa97a502c8b60c1d18f81664a (patch) | |
tree | baa5b2456a1bdfec97fa97be2ef07eb3295a82d7 /xfa/fgas/crt/fgas_memory.h | |
parent | 32e693fe13105fab5baf81b334e932fce62d89b5 (diff) | |
download | pdfium-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/fgas/crt/fgas_memory.h')
-rw-r--r-- | xfa/fgas/crt/fgas_memory.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fgas/crt/fgas_memory.h b/xfa/fgas/crt/fgas_memory.h index a83933c7a5..1034c417d7 100644 --- a/xfa/fgas/crt/fgas_memory.h +++ b/xfa/fgas/crt/fgas_memory.h @@ -7,6 +7,8 @@ #ifndef XFA_FGAS_CRT_FGAS_MEMORY_H_ #define XFA_FGAS_CRT_FGAS_MEMORY_H_ +#include <memory> + #include "core/fxcrt/include/fx_memory.h" #include "core/fxcrt/include/fx_system.h" @@ -21,9 +23,9 @@ class IFX_MemoryAllocator { virtual void* Alloc(size_t size) = 0; virtual void Free(void* pBlock) = 0; - static IFX_MemoryAllocator* Create(FX_ALLOCTYPE eType, - size_t chunkSize, - size_t blockSize); + static std::unique_ptr<IFX_MemoryAllocator> Create(FX_ALLOCTYPE eType, + size_t chunkSize, + size_t blockSize); }; class CFX_Target { |