5#ifndef FLUTTER_FML_CLOSURE_H_
6#define FLUTTER_FML_CLOSURE_H_
10#include "flutter/fml/macros.h"
37 closure_ = other.Release();
41 closure_ = other.Release();
51 auto old_closure = closure_;
Wraps a closure that is invoked in the destructor unless released by the caller.
ScopedCleanupClosure()=default
fml::closure SetClosure(const fml::closure &closure)
ScopedCleanupClosure(ScopedCleanupClosure &&other)
ScopedCleanupClosure(const fml::closure &closure)
ScopedCleanupClosure & operator=(ScopedCleanupClosure &&other)
Dart_NativeFunction function
std::function< void()> closure