Skip to content

Memory usage gets low after launching the game #3161

@jlj001031

Description

@jlj001031

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Honestly I'm not sure if it's a bug or not...

I am just started developing my project in iced, the current project progress is just a simple window style optimization, and there is no actual business logic, the following is a description of the situation I encountered: After starting my iced project, the program window opened, I checked the task manager and found that its memory occupation was about 100M+ (release mode execution was about 90M+), and then I started the game Battlefield 6, and when I exited the game, I found that the memory occupation was only 12M, and it was stable. I have had the same situation on multiple attempts. This confused but pleasantly surprised me that the lower memory usage is exactly what my project needs, or the pursuit of all programming.

I'm not sure why this is happening, and I'm not sure if it's a bug or if I shouldn't have raised this issue.
Here's a screenshot of my program, and you can see it's simple, with just a custom title bar and a button that can't be clicked:

Image

What is the expected behavior?

A program that doesn't contain any business logic has a memory footprint of 100M after startup, which is really a frustrating thing, and it's a problem in all the GUI frameworks I've studied. I wonder if there is some way to autonomously control this happening? Is this a framework for resource recovery or is it a systematic behavior? Is it possible to trigger manually by calling a function?

Version

crates.io release

Operating System

Windows

Do you have any log output?

no

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions