Chromium Code Reviews| Index: core/include/fxcrt/fx_basic.h |
| diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h |
| index bc3d81200feeee0706c48a37ec1578dbe7f1220f..3e556f5439230ed086574ec5d11a71254178e28c 100644 |
| --- a/core/include/fxcrt/fx_basic.h |
| +++ b/core/include/fxcrt/fx_basic.h |
| @@ -947,6 +947,13 @@ class CFX_AutoRestorer { |
| T m_OldValue; |
| }; |
| +// Used with nonstd::unique_ptr to Release() objects that can't be deleted. |
| +template <class T> |
| +struct ReleaseDeleter { |
| + inline void operator()(T* ptr) const { ptr->Release(); } |
| +}; |
| + |
| +// TODO(thestig) Remove in favor of nonstd::unique_ptr. |
|
Tom Sepez
2015/09/18 23:29:32
except that this is more like shared ptr, with ref
Lei Zhang
2015/09/18 23:51:51
Is it? I'm not seeing the ref-counting.
|
| template <class T> |
| class CFX_SmartPointer { |
| public: |
| @@ -959,6 +966,7 @@ class CFX_SmartPointer { |
| protected: |
| T* m_pObj; |
| }; |
| + |
| #define FX_DATALIST_LENGTH 1024 |
| template <size_t unit> |
| class CFX_SortListArray { |