Chromium Embedded Framework (CEF)
127.1.0+ga1ec504+chromium-127.0.6533.57
|
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 |