5#ifndef FLUTTER_FML_PLATFORM_DARWIN_CF_UTILS_H_
6#define FLUTTER_FML_PLATFORM_DARWIN_CF_UTILS_H_
8#include <CoreFoundation/CoreFoundation.h>
10#include "flutter/fml/macros.h"
29 other.instance_ =
nullptr;
33 Reset(other.Release());
38 if (instance_ !=
nullptr) {
45 if (instance_ !=
nullptr) {
59 operator T()
const {
return instance_; }
61 explicit operator bool()
const {
return instance_ !=
nullptr; }
CFRef(const CFRef &other)
CFRef & operator=(CFRef &&other)
void Reset(T instance=nullptr)