Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the ivar to nil after release it in dealloc method. #38737

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions shell/platform/darwin/ios/framework/Source/FlutterEngine.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down