From eec047c9f73b9a71564fb0440e5bfcb989bd8985 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 19 Jun 2015 18:14:50 -0600 Subject: [PATCH] Fixed leak on Shutdown (#200) --- imgui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index a94587bf..e233b3b3 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1719,8 +1719,6 @@ bool ImGuiTextFilter::PassFilter(const char* val) const return false; } -//----------------------------------------------------------------------------- - // On some platform vsnprintf() takes va_list by reference and modifies it. // va_copy is the 'correct' way to copy a va_list but Visual Studio prior to 2013 doesn't have it. #ifndef va_copy @@ -2266,6 +2264,9 @@ void ImGui::Shutdown() ImGui::MemFree(g.PrivateClipboard); g.PrivateClipboard = NULL; } + g.InputTextState.Text.clear(); + g.InputTextState.InitialText.clear(); + g.InputTextState.TempTextBuffer.clear(); if (g.LogFile && g.LogFile != stdout) {