-
-
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
Possible memory leak. opengl3 #2981
Comments
There hasn't been a leak in ImDrawList since release afaik - we only keep buffer allocated accross frames but that doesn't accumulate. So your issue is either:
Note that you could perfectly run your loop without any of the GL/VX code, only NewFrame+Begin/End/DrawList stuff/Render at a much faster speed and confirm if you get a leak which would mean the issue is in 1) not in 2) or 3). Similarly to could skip the GL rendering completely (removed glClear, RenderDrawData, swapBuffer) etc. Either way until proven it doesn't seem like some code in the dear imgui repository is faulty. |
Thank you for a quick reply and a descriptive answer! I forgot to mention that I did run ImGui on windows without any sign of the memory leak, as well as I checked the Metrics window and it kept the same values. So I also doubt that dear imgui is the reason. I don't really know a lot about openGl and how it interacts with imgui. |
I already mentioned a way to easily differentiate 2 from 3 which would narrow it down to either OpenGL driver behavior or VxWorks back-end behavior.
In both cases the problem is probably to be taken to the maker of that closed-source solution.
|
Closing this because out of our support scope. |
Reverted the changes of #4468 with b8b0f9d, not using glBufferSubData() anymore. |
Version/Branch of Dear ImGui:
Version: 1.72 WIP
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_opengl3.cpp
Compiler: llvm
Operating System: VxWorks 7
My Issue/Question:
I'm using the function to add primitives to the draw list for a single window. This renders the gui perfect, but there seems to be a memory leak as after 2 hours of running continuously the system crashes due to the lack of ram.
Here is the code used to initialize build up the screen. Only one window is used as a "canvas" to place all the primitives on. At most there is close to 300 objects that are drawn inside the draw_list.
Hope someone can give some insight!
The text was updated successfully, but these errors were encountered: