Skip to content

Provide API to Free Retained Widget Memory in GTK4 #2089

@Skxxtz

Description

@Skxxtz

Problem and Expected Behavior

Say I have a GtkListView setup including a CustomSorter, CustomFilter, and a Factory. Whenever all of them are destroyed, I would expect the memory usage of my application to go down – it doesn't.

After some research, I came to the conclusion that this might be some internal widget cache or a "memory reservation" for later use. Even after calling Application::hold and then destroying and dropping the window entirely, the memory stays allocated.

However, I would like to have the possibility to shrink the memory back to what it actually needs. My application is dormant but runs in the background but still has this memory allocated, which is confusing and unnecessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions