Chromium Embedded Framework (CEF)
114.2.1+gd70a0a8+chromium-114.0.5735.45
|
A thread-safe variant of RefCounted<T> More...
#include "include/base/cef_ref_counted.h"
Public Member Functions | |
RefCountedThreadSafe () | |
RefCountedThreadSafe (const RefCountedThreadSafe &)=delete | |
RefCountedThreadSafe & | operator= (const RefCountedThreadSafe &)=delete |
void | AddRef () const |
void | Release () const |
Static Public Attributes | |
static constexpr cef_subtle::StartRefCountFromZeroTag | kRefCountPreference |
Protected Member Functions | |
~RefCountedThreadSafe ()=default | |
Friends | |
struct | DefaultRefCountedThreadSafeTraits< T > |
A thread-safe variant of RefCounted<T>
class MyFoo : public base::RefCountedThreadSafe<MyFoo> { ... };
If you're using the default trait, then you should add compile time asserts that no one else is deleting your object. i.e.
private: friend class base::RefCountedThreadSafe<MyFoo>; ~MyFoo();
We can use REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE() with RefCountedThreadSafe too. See the comment above the RefCounted definition for details.
|
inlineexplicit |
|
delete |
|
protecteddefault |
|
inline |
|
delete |
|
inline |
|
friend |
|
staticconstexpr |