Skip to content

Android Add2App leaks the FlutterView #54275

@dannyvalentesonos

Description

@dannyvalentesonos

In Add2App, when closing a FlutterView by calling finish() on the activity that hosts the view, a leak is present. The offender is a method channel that we have in a long living delegate that we've created which is given the DartExecutor from the engine that we've created and cached.

It seems that some the channel ends up having a reference to a TextInputPlugin instance which has a reference to the FlutterView which never gets released when the FlutterView is closed.

I'm attaching the screenshots of the leak.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowc: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.perf: memoryPerformance issues related to memoryplatform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions