mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 04:28:47 +02:00
ImVector: added clear_delete(), clear_destruct() helpers.
# Conflicts: # imgui.cpp
This commit is contained in:
15
imgui.cpp
15
imgui.cpp
@ -2971,8 +2971,7 @@ ImGuiWindow::~ImGuiWindow()
|
||||
{
|
||||
IM_ASSERT(DrawList == &DrawListInst);
|
||||
IM_DELETE(Name);
|
||||
for (int i = 0; i != ColumnsStorage.Size; i++)
|
||||
ColumnsStorage[i].~ImGuiOldColumns();
|
||||
ColumnsStorage.clear_destruct();
|
||||
}
|
||||
|
||||
ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end)
|
||||
@ -4343,9 +4342,7 @@ void ImGui::Shutdown(ImGuiContext* context)
|
||||
CallContextHooks(&g, ImGuiContextHookType_Shutdown);
|
||||
|
||||
// Clear everything else
|
||||
for (int i = 0; i < g.Windows.Size; i++)
|
||||
IM_DELETE(g.Windows[i]);
|
||||
g.Windows.clear();
|
||||
g.Windows.clear_delete();
|
||||
g.WindowsFocusOrder.clear();
|
||||
g.WindowsTempSortBuffer.clear();
|
||||
g.CurrentWindow = NULL;
|
||||
@ -4362,18 +4359,14 @@ void ImGui::Shutdown(ImGuiContext* context)
|
||||
g.BeginPopupStack.clear();
|
||||
|
||||
g.CurrentViewport = g.MouseViewport = g.MouseLastHoveredViewport = NULL;
|
||||
for (int i = 0; i < g.Viewports.Size; i++)
|
||||
IM_DELETE(g.Viewports[i]);
|
||||
g.Viewports.clear();
|
||||
g.Viewports.clear_delete();
|
||||
|
||||
g.TabBars.Clear();
|
||||
g.CurrentTabBarStack.clear();
|
||||
g.ShrinkWidthBuffer.clear();
|
||||
|
||||
g.Tables.Clear();
|
||||
for (int i = 0; i < g.TablesTempDataStack.Size; i++)
|
||||
g.TablesTempDataStack[i].~ImGuiTableTempData();
|
||||
g.TablesTempDataStack.clear();
|
||||
g.TablesTempDataStack.clear_destruct();
|
||||
g.DrawChannelsTempMergeBuffer.clear();
|
||||
|
||||
g.ClipboardHandlerData.clear();
|
||||
|
Reference in New Issue
Block a user