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

Commit 2c53043

Browse files
author
Chris Yang
authored
[ios] Fix testDeallocated failing locally. (#45663)
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
1 parent 54eac35 commit 2c53043

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shell/platform/darwin/ios/framework/Source/FlutterEngineTest.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ - (void)testInfoPlist {
113113

114114
- (void)testDeallocated {
115115
__weak FlutterEngine* weakEngine = nil;
116-
{
116+
@autoreleasepool {
117117
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"foobar"];
118118
weakEngine = engine;
119119
[engine run];

0 commit comments

Comments
 (0)