mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
`AddLocalChild(LocalComponent*)` is deprecated. It was replaced by: `AddLocalChild(LocalComponentFactory)`, which is a type alias for a lambda that returns a `std::unique_ptr<LocalComponentImpl>`. This change addresses problems that arised due to object lifetime management of the components, and allows RealmBuilder to model the component lifecycle of local components in a way that's more consistent with other components. The RealmBuilder-built `Realm` now owns the lifetime of the local components, instead of the client, and those objects are valid until the `Realm` is destroyed. Bug: fxbug.dev/109804