Flutter Engine
The Flutter Engine
scoped_nsautorelease_pool.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/fml/platform/darwin/scoped_nsautorelease_pool.h"
6
7#include <objc/message.h>
8#include <objc/runtime.h>
9
10namespace {
11typedef id (*msg_send)(void*, SEL);
12} // anonymous namespace
13
14namespace fml {
15
17 autorelease_pool_ = reinterpret_cast<msg_send>(objc_msgSend)(
18 objc_getClass("NSAutoreleasePool"), sel_getUid("new"));
19}
20
22 reinterpret_cast<msg_send>(objc_msgSend)(autorelease_pool_,
23 sel_getUid("drain"));
24}
25
26} // namespace fml
Definition: ascii_trie.cc:9
const uintptr_t id