[ios] Fix testDeallocated failing locally. (flutter/engine#45663)
Moving the code block to autorelease pool to ensure the FlutterEngine is released in the test. Fixes: https://github.com/flutter/flutter/issues/134388 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -113,7 +113,7 @@ FLUTTER_ASSERT_ARC
|
||||
|
||||
- (void)testDeallocated {
|
||||
__weak FlutterEngine* weakEngine = nil;
|
||||
{
|
||||
@autoreleasepool {
|
||||
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"foobar"];
|
||||
weakEngine = engine;
|
||||
[engine run];
|
||||
|
||||
Reference in New Issue
Block a user