You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm observing a significant memory leak with the Metal backend. I've traced it down to the buffers allocated in dequeueReusableBufferOfLength:device:. The asynchronous callback responsible for releasing the buffers is running on a thread without any ImGui context active, therefore the buffers are never released.
I suggest the following changes to fix the problem.
Version/Branch of Dear ImGui:
git commit 9a5da23, but the code is the same on master
Back-ends:
imgui_impl_metal.cpp + custom platform backend
Compiler, OS:
macOS + Clang 14
Full config/build information:
No response
Details:
My Issue/Question:
I'm using multiple ImGui contexts within a single application, with a thread_local GImGui pointer, as described in imgui.cpp:
I'm observing a significant memory leak with the Metal backend. I've traced it down to the buffers allocated in
dequeueReusableBufferOfLength:device:
. The asynchronous callback responsible for releasing the buffers is running on a thread without any ImGui context active, therefore the buffers are never released.I suggest the following changes to fix the problem.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: