MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / GcCompactTransientWindowBuffers

Method GcCompactTransientWindowBuffers

KBotExt/imgui/imgui.cpp:3814–3824  ·  view source on GitHub ↗

Free up/compact internal window buffers, we can use this when a window becomes unused. Not freed: - ImGuiWindow, ImGuiWindowSettings, Name, StateStorage, ColumnsStorage (may hold useful data) This should have no noticeable visual effect. When the window reappear however, expect new allocation/buffer growth/copy cost.

Source from the content-addressed store, hash-verified

3812// - ImGuiWindow, ImGuiWindowSettings, Name, StateStorage, ColumnsStorage (may hold useful data)
3813// This should have no noticeable visual effect. When the window reappear however, expect new allocation/buffer growth/copy cost.
3814void ImGui::GcCompactTransientWindowBuffers(ImGuiWindow* window)
3815{
3816 window->MemoryCompacted = true;
3817 window->MemoryDrawListIdxCapacity = window->DrawList->IdxBuffer.Capacity;
3818 window->MemoryDrawListVtxCapacity = window->DrawList->VtxBuffer.Capacity;
3819 window->IDStack.clear();
3820 window->DrawList->_ClearFreeMemory();
3821 window->DC.ChildWindows.clear();
3822 window->DC.ItemWidthStack.clear();
3823 window->DC.TextWrapPosStack.clear();
3824}
3825
3826void ImGui::GcAwakeTransientWindowBuffers(ImGuiWindow* window)
3827{

Callers

nothing calls this directly

Calls 2

_ClearFreeMemoryMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected