Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

iOS: Make FlutterViewController.engine a strong ref #56663

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ FLUTTER_DARWIN_EXPORT
* `FlutterViewController` is initialized with or a new `FlutterEngine` implicitly created if
* no engine was supplied during initialization.
*/
@property(weak, nonatomic, readonly) FlutterEngine* engine;
@property(nonatomic, readonly) FlutterEngine* engine;

/**
* The `FlutterBinaryMessenger` associated with this FlutterViewController (used for communicating
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ - (void)handleKeyboardAnimationCallbackWithTargetTime:(fml::TimePoint)targetTime
@end

@implementation FlutterViewController {
FlutterEngine* _engine;
flutter::ViewportMetrics _viewportMetrics;
MouseState _mouseState;
}
Expand Down Expand Up @@ -302,10 +301,6 @@ - (void)performCommonViewControllerInitialization {
[self setUpNotificationCenterObservers];
}

- (FlutterEngine*)engine {
return _engine;
}

- (void)setUpNotificationCenterObservers {
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
[center addObserver:self
Expand Down