Skip to content

Commit

Permalink
[ios] Fix testDeallocated failing locally. (#45663)
Browse files Browse the repository at this point in the history
Moving the code block to autorelease pool to ensure the FlutterEngine is released in the test.

Fixes: flutter/flutter#134388

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
Chris Yang committed Sep 12, 2023
1 parent 54eac35 commit 2c53043
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ - (void)testInfoPlist {

- (void)testDeallocated {
__weak FlutterEngine* weakEngine = nil;
{
@autoreleasepool {
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"foobar"];
weakEngine = engine;
[engine run];
Expand Down

0 comments on commit 2c53043

Please sign in to comment.