Chromium Embedded Framework (CEF)
126.2.0+g5c56e98+chromium-126.0.6478.62
|
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 |