Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iOS: Make FlutterViewController.engine a strong ref (#56663)
Previously, FlutterViewController.engine was declared as a weak readonly property, but we explicitly declared the `FlutterEngine* _engine` ivar as a strong reference in the implementation. This changes the property declaration to be strong and eliminates the now unnecessary ivar. There is also no semantic change to FlutterViewController itself, since the `_engine` ivar had been manually declared as a strong reference. There is no semantic change for users of FlutterViewController.engine since whether a user acquires a strong or weak reference to the engine is determined by whether they declare the pointer to which they assign it as strong or weak. This also eliminates the need for the `engine` getter, which was only present to prevent a warning that the strong ivar didn't match the weak property declaration. No changes to tests since this introduces no semantic changes. Issue: flutter/flutter#137801 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
- Loading branch information