Skip to content

[pigeon] Have Objective-C HostApi and FlutterApi maintain a weak reference to FlutterBinaryMessenger #103644

@bparrishMines

Description

@bparrishMines

When using a HostApi that stores an object and the object also uses a FlutterApi, it creates a circular reference:

Object--S-->FlutterApi--S-->BinaryMessenger--S-->HostApi--S-->Dictionary<int, Object>
^-----------------------------------------------S------------------------------------------------/

I would expect that if the engine would release their reference to the BinaryMessenger, then the host apis and flutter apis should no longer need to handle/invoke methods. Therefore, their reference to it could be weak.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions