1.86 WIP + internals: tweaks table temp data code.

This commit is contained in:
ocornut
2021-10-14 16:58:14 +02:00
parent 13cdf2ff0e
commit e3bd9434b1
8 changed files with 34 additions and 24 deletions

View File

@ -1,4 +1,4 @@
// dear imgui, v1.85
// dear imgui, v1.86 WIP
// (main code and documentation)
// Help:
@ -4130,9 +4130,9 @@ void ImGui::NewFrame()
for (int i = 0; i < g.TablesLastTimeActive.Size; i++)
if (g.TablesLastTimeActive[i] >= 0.0f && g.TablesLastTimeActive[i] < memory_compact_start_time)
TableGcCompactTransientBuffers(g.Tables.GetByIndex(i));
for (int i = 0; i < g.TablesTempDataStack.Size; i++)
if (g.TablesTempDataStack[i].LastTimeActive >= 0.0f && g.TablesTempDataStack[i].LastTimeActive < memory_compact_start_time)
TableGcCompactTransientBuffers(&g.TablesTempDataStack[i]);
for (int i = 0; i < g.TablesTempData.Size; i++)
if (g.TablesTempData[i].LastTimeActive >= 0.0f && g.TablesTempData[i].LastTimeActive < memory_compact_start_time)
TableGcCompactTransientBuffers(&g.TablesTempData[i]);
if (g.GcCompactAll)
GcCompactTransientMiscBuffers();
g.GcCompactAll = false;
@ -4246,7 +4246,7 @@ void ImGui::Shutdown(ImGuiContext* context)
g.ShrinkWidthBuffer.clear();
g.Tables.Clear();
g.TablesTempDataStack.clear_destruct();
g.TablesTempData.clear_destruct();
g.DrawChannelsTempMergeBuffer.clear();
g.ClipboardHandlerData.clear();