Skip to content

Releasing resources acquired in a plugin #19206

@mehmetf

Description

@mehmetf

Plugins in standalone flutter apps typically live as long as the application is alive. However, in add2app use case, we would want to be able to free the resources and destroy the plugin if the isolate backing the plugin is no longer active (e.g. if FlutterView is destroyed). In some cases, this can be done by subscribing to the activity lifecycle (e.g. if the Flutter is added as a separate activity) but most often the plugin is attached to a single view.

We need a way to detect that the isolate (i.e. FlutterNativeView) is being destroyed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowcustomer: mulligan (g3)engineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyplatform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions