Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkUniqueCFRef.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkUniqueCFRef_DEFINED
9#define SkUniqueCFRef_DEFINED
10
12#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
13
15
16#include <CoreFoundation/CoreFoundation.h>
17#include <memory>
18#include <type_traits>
19
20template <typename CFRef> using SkUniqueCFRef =
21 std::unique_ptr<std::remove_pointer_t<CFRef>, SkFunctionObject<CFRelease>>;
22
23#endif
24#endif