| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FXCRT_INCLUDE_FX_MEMORY_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_MEMORY_H_ |
| 8 #define CORE_FXCRT_INCLUDE_FX_MEMORY_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_MEMORY_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 struct ReleaseDeleter { | 100 struct ReleaseDeleter { |
| 101 inline void operator()(T* ptr) const { ptr->Release(); } | 101 inline void operator()(T* ptr) const { ptr->Release(); } |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 // Used to help transfer ownership of a raw pointer to std::unique_ptr. | 104 // Used to help transfer ownership of a raw pointer to std::unique_ptr. |
| 105 template <typename T> | 105 template <typename T> |
| 106 std::unique_ptr<T> WrapUnique(T* ptr) { | 106 std::unique_ptr<T> WrapUnique(T* ptr) { |
| 107 return std::unique_ptr<T>(ptr); | 107 return std::unique_ptr<T>(ptr); |
| 108 } | 108 } |
| 109 | 109 |
| 110 class CFX_Deletable { | |
| 111 public: | |
| 112 virtual ~CFX_Deletable() {} | |
| 113 }; | |
| 114 | |
| 115 #endif // __cplusplus | 110 #endif // __cplusplus |
| 116 | 111 |
| 117 #endif // CORE_FXCRT_INCLUDE_FX_MEMORY_H_ | 112 #endif // CORE_FXCRT_INCLUDE_FX_MEMORY_H_ |
| OLD | NEW |