5#ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_OBJECT_H_
6#define FLUTTER_IMPELLER_TOOLKIT_INTEROP_OBJECT_H_
32 if (ref_count_-- == 1u) {
52 std::atomic_uint64_t ref_count_ = {1u};
55template <
typename Clasz,
typename CSibling>
66template <
typename Object>
90 if (object_ == other.object_) {
98 object_ = other.object_;
103 std::swap(object_, other.object_);
123 explicit operator bool()
const {
return !!object_; }
127 auto to_leak = object_;
133 Object* object_ =
nullptr;
145template <
typename Object>
150template <
typename Object>
155template <
typename Object>
160template <
typename Object,
typename... CtorArgs>
ObjectBase(const ObjectBase &)=delete
static void SafeRelease(void *ptr)
ObjectBase & operator=(const ObjectBase &)=delete
virtual ~ObjectBase()=default
uint64_t GetRefCountForTests() const
ObjectBase(ObjectBase &&)=delete
ObjectBase & operator=(ObjectBase &&)=delete
static void SafeRetain(void *ptr)
Object & operator*() const
ScopedObject(Object *ptr, AdoptTag)
ScopedObject(std::nullptr_t)
Object * operator->() const
Object::InteropCSibling * GetC() const
ScopedObject(Object *ptr)
ScopedObject & operator=(const ScopedObject &other)
ScopedObject(const ScopedObject &other)
ScopedObject(ScopedObject &&other)
Object::InteropCSibling * Leak()
ScopedObject & operator=(ScopedObject &&other)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
#define FML_DCHECK(condition)
ScopedObject< Object > Adopt(Object *object)
ScopedObject< Object > Ref(Object *object)
ScopedObject< Object > Create(CtorArgs &&... args)