[iOS] Add autorelease for window scene geometry preferences object (flutter/engine#36958)

This commit is contained in:
Wu Zhong
2022-10-26 01:05:25 +08:00
committed by GitHub
parent 42e8260c72
commit 5c7bc4b473

View File

@@ -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) {