|
Chromium Embedded Framework (CEF)
145.0.1+g472e75d+chromium-145.0.7632.5
|
A thread-safe variant of RefCounted<T> More...
#include "include/base/cef_ref_counted.h"
Public Types | |
| using | RefCountPreferenceTag = cef_subtle::StartRefCountFromZeroTag |
Public Member Functions | |
| RefCountedThreadSafe () | |
| RefCountedThreadSafe (const RefCountedThreadSafe &)=delete | |
| RefCountedThreadSafe & | operator= (const RefCountedThreadSafe &)=delete |
| void | AddRef () const |
| void | Release () const |
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.
| using base::RefCountedThreadSafe< T, Traits >::RefCountPreferenceTag = cef_subtle::StartRefCountFromZeroTag |
|
inline |
|
delete |
|
protecteddefault |
|
inline |
|
delete |
|
inline |
|
friend |