diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 45e90e0c76..ebedfc802b 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -1549,8 +1549,8 @@ static flutter::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* touch) if (!(_orientationPreferences & currentInterfaceOrientation)) { [self setNeedsUpdateOfSupportedInterfaceOrientations]; UIWindowSceneGeometryPreferencesIOS* preference = - [[UIWindowSceneGeometryPreferencesIOS alloc] - initWithInterfaceOrientations:_orientationPreferences]; + [[[UIWindowSceneGeometryPreferencesIOS alloc] + initWithInterfaceOrientations:_orientationPreferences] autorelease]; [windowScene requestGeometryUpdateWithPreferences:preference errorHandler:^(NSError* error) {