mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-22 00:19:42 +00:00
Demo: re-use tree data. Fix property editor vertical alignment. Tweak recent memory allocation monitor.
This commit is contained in:
@@ -15070,7 +15070,12 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
||||
for (int n = buf_size - 1; n >= 0; n--)
|
||||
{
|
||||
ImGuiDebugAllocEntry* entry = &info->LastEntriesBuf[(info->LastEntriesIdx - n + buf_size) % buf_size];
|
||||
BulletText("Frame %06d: %+3d ( %2d malloc, %2d free )%s", entry->FrameCount, entry->AllocCount - entry->FreeCount, entry->AllocCount, entry->FreeCount, (n == 0) ? " (most recent)" : "");
|
||||
BulletText("Frame %06d: %+3d ( %2d alloc, %2d free )", entry->FrameCount, entry->AllocCount - entry->FreeCount, entry->AllocCount, entry->FreeCount);
|
||||
if (n == 0)
|
||||
{
|
||||
SameLine();
|
||||
Text("<- %d frames ago", g.FrameCount - entry->FrameCount);
|
||||
}
|
||||
}
|
||||
TreePop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user