From eb4725c3627bf64694bac3019cf5289e734f210f Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 29 Jun 2023 08:11:47 -0700 Subject: [PATCH] [Impeller] Add an autorelease pool to the GoldenTests fixture (flutter/engine#43323) --- engine/src/flutter/impeller/golden_tests/golden_tests.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/flutter/impeller/golden_tests/golden_tests.cc b/engine/src/flutter/impeller/golden_tests/golden_tests.cc index 24a229e9a45..c99d9abc058 100644 --- a/engine/src/flutter/impeller/golden_tests/golden_tests.cc +++ b/engine/src/flutter/impeller/golden_tests/golden_tests.cc @@ -6,6 +6,7 @@ #include +#include "flutter/fml/platform/darwin/scoped_nsautorelease_pool.h" #include "impeller/aiks/canvas.h" #include "impeller/entity/contents/conical_gradient_contents.h" #include "impeller/geometry/path_builder.h" @@ -59,6 +60,10 @@ class GoldenTests : public ::testing::Test { } private: + // This must be placed before any other members that may use the + // autorelease pool. + fml::ScopedNSAutoreleasePool autorelease_pool_; + std::unique_ptr screenshoter_; };