Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Ensure that the auto-release pool is available when the GoldenPlaygroundTestImpl is destructed #43322

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions impeller/golden_tests/golden_playground_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ class GoldenPlaygroundTest
ISize GetWindowSize() const;

private:
struct GoldenPlaygroundTestImpl;
// This is only a shared_ptr so it can work with a forward declared type.
std::shared_ptr<GoldenPlaygroundTestImpl> pimpl_;

#if FML_OS_MACOSX
// This must be placed first so that the autorelease pool is not destroyed
// until the GoldenPlaygroundTestImpl has been destructed.
fml::ScopedNSAutoreleasePool autorelease_pool_;
#endif

struct GoldenPlaygroundTestImpl;
// This is only a shared_ptr so it can work with a forward declared type.
std::shared_ptr<GoldenPlaygroundTestImpl> pimpl_;

FML_DISALLOW_COPY_AND_ASSIGN(GoldenPlaygroundTest);
};

Expand Down