5#ifndef FLUTTER_FML_PLATFORM_DARWIN_CF_UTILS_H_
6#define FLUTTER_FML_PLATFORM_DARWIN_CF_UTILS_H_
8#include <CoreFoundation/CoreFoundation.h>
52 Reset(other.Release());
101 T
Get()
const {
return instance_; }
109 operator T()
const {
return instance_; }
112 explicit operator bool()
const {
CFRef(const CFRef &other)
CFRef()
Creates a new null CFRef.
void Retain(T instance=CFRefTraits< T >::kNullValue)
~CFRef()
Releases the underlying CoreFoundation object, if non-null.
CFRef & operator=(CFRef &&other)
Takes over ownership of the CoreFoundation object owned by other.
void Reset(T instance=CFRefTraits< T >::kNullValue)
Default retain and release implementations for CFRef.
static void Retain(T instance)
static constexpr T kNullValue
static void Release(T instance)