Skip to content

Engine C++ code should not use [=] to capture variables for lambdas #106892

@flar

Description

@flar

The use of [=] is lazy programming on its own. But more importantly, in the case of the Engine code, many of the lambda expressions are referencing variables that have controlled lifetimes and require disposal on other threads via queues and it is easy to miss these dependencies when the captured variables are not explicitly listed in the capture syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions