Skip to content

Update backends to avoid use of dictionaries for auxiliary data storage #258

@stackotter

Description

@stackotter

At the moment, some backends make heavy use of dictionaries to store information such as button click handlers (such as WinUIBackend and its associated InternalState class). This leads to apps slowly using more and more memory, and is also a bit efficient in terms of compute as well (but probably not as much).

The solution to this, which some backends already employ, is to subclass widgets that we need to store auxiliary data about, and add properties to our subclasses to store said data. This ensures that the data gets freed along with the widgets, and also makes it trivial to access the auxiliary data whenever it is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions