From 64de509cfd61092090b0758898fb793606860616 Mon Sep 17 00:00:00 2001 From: IohannRabeson Date: Sun, 25 May 2025 17:33:36 -0400 Subject: [PATCH] Fix invalid delete operator usage. When allocating with new[] you must use delete[] to release the memory. --- source/source/SimpleCapture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/source/SimpleCapture.cpp b/source/source/SimpleCapture.cpp index 9fe28b3..1ba946e 100644 --- a/source/source/SimpleCapture.cpp +++ b/source/source/SimpleCapture.cpp @@ -183,7 +183,7 @@ SimpleCapture::SimpleCapture( char* charwindowText = new char[(int)(Length + 1)]; GetWindowTextA(m_clientHwnd, charwindowText, (Length + 1)); m_windowText = charwindowText + std::string(" : "); - delete charwindowText; + delete[] charwindowText; } //