mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-18 19:13:38 +00:00
Memory leak when rendering with DX11 in C++ #7615
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#7615
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.89.6, Branch: master
Back-ends:
imgui_impl_win32.cpp + imgui_impl_dx11.cpp
Compiler, OS:
Windows 10 + MSVC 14.39.33519
Full config/build information:
No response
Details:
My Issue/Question:
I am using Dear ImGui with the win32 and dx11 backends in a fairly complicated control panel application, and it appears to be causing a memory leak. The code I'm using to render is straight from the demo:



Every frame, imgui_new_frame() is called, then our UI code, then imgui_dx11_render(). However, at a regular interval 32,903 bytes are allocated and never deallocated. In one test it was every ~8 seconds, and in another every ~700 milliseconds:
Line 215 is
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());. I'm not able to post the full code because there are thousands of lines and it's confidential, so I understand that it may be difficult to help, but it would be helpful to know:It's very strange because the code works exactly like the example, and I doubt that Dear ImGui or DX11 have significant memory leaks like this. The fact that it happens at a consistent interval but not every frame also seems odd.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code: