-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example_glfw_metal consumes too much RAM while in background (11+ GB) #2910
Comments
I've just tested this with the latest commit ( |
Hello, |
Thanks for the quick response! I'm trying to provide all the information I have in order to fix this. If I discover anything new, I'll post it here :) |
…ck to ensure allocations get freed even if underlying system event loop gets paused due to app nap (ocornut#2910)
I traced it down to Unfortunately this is kind of ugly as it adds another nesting level, maybe there is a better solution? I pushed a branch that adds the |
That’s the conclusion I came to as well, and I think this is the correct solution. |
I've just tested the branch at bear24rw@90d2b00 and it works perfectly! It runs at a constant 40-65 Mb of RAM, independently of it being in the background or in the foreground. I think this could be the way to fix it. |
Max fix is now merged, thanks a lot! |
…ck to ensure allocations get freed even if underlying system event loop gets paused due to app nap (ocornut#2910, ocornut#2917)
Version/Branch of Dear ImGui:
Version: 1.74 WIP
Branch: master (commit
b205ab01
)Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_metal.cpp
Operating System: macOS Catalina 10.15.1
My Issue:
While running the example app (
imgui_demo.cpp
), if the app goes to the background, it starts to consume more and more RAM until the system runs out and hangs. I've seen it consume up to 58 GB of RAM all by itself.Screenshot
Here's an example of macOS' activity monitor showing 11.54 GB of RAM being used by the example app while in the background.
Standalone, minimal, complete and verifiable example:
Just compile the app inside
examples/example_glfw_metal
from commitb205ab01
using GNU Make, run the executable, and place any other application on top of it, covering the entire app, for example Safari, Sublime Text... I found out that any app in full screen invokes this behavior . After that, It will start to memory leak and consume more and more resources pretty much instantaneously.The text was updated successfully, but these errors were encountered: