From deb425e6f84389856cb3772751af1ad5f3be3181 Mon Sep 17 00:00:00 2001 From: endless7 Date: Tue, 10 Jan 2023 11:15:17 +0800 Subject: [PATCH] Set ivars to nil. --- .../platform/darwin/ios/framework/Source/FlutterEngine.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index 480b284678614..279e0da8b5ed1 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -261,20 +261,27 @@ - (void)dealloc { }]; [_labelPrefix release]; + _labelPrefix = nil; [_initialRoute release]; + _initialRoute = nil; [_pluginPublications release]; + _pluginPublications = nil; [_registrars release]; + _registrars = nil; _binaryMessenger.parent = nil; _textureRegistry.parent = nil; [_binaryMessenger release]; + _binaryMessenger = nil; [_textureRegistry release]; _textureRegistry = nil; [_isolateId release]; + _isolateId = nil; NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; if (_flutterViewControllerWillDeallocObserver) { [center removeObserver:_flutterViewControllerWillDeallocObserver]; [_flutterViewControllerWillDeallocObserver release]; + _flutterViewControllerWillDeallocObserver = nil; } [center removeObserver:self];