From 4c03ddf3ba4ef9a84fcfbde5388c73f823c1525e Mon Sep 17 00:00:00 2001 From: Mohamed Shazan Date: Mon, 31 Aug 2026 03:07:37 +0530 Subject: [PATCH 1/2] Replace LocalAlloc/LocalFree with HeapAlloc/HeapFree Replace Local Allocation functions with the modern Heap functions as suggested in https://learn.microsoft.com/en-us/windows/win32/memory/comparing-memory-allocation-methods --- releases/v3.3.195/lib/GameInput.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/v3.3.195/lib/GameInput.cpp b/releases/v3.3.195/lib/GameInput.cpp index 910e60f..f7fc016 100644 --- a/releases/v3.3.195/lib/GameInput.cpp +++ b/releases/v3.3.195/lib/GameInput.cpp @@ -63,7 +63,7 @@ class Vector { if (m_data != nullptr) { - LocalFree(m_data); + HeapFree(GetProcessHeap(), 0, m_data); } } @@ -74,13 +74,13 @@ class Vector { const size_t capacity = (m_capacity + count) * 2; - T* const data = static_cast(LocalAlloc(LPTR, capacity * sizeof(T))); + T* const data = static_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Capacity * sizeof(T)))); RETURN_IF_NULL_ALLOC(data); if (m_data != nullptr) { memcpy_s(data, count * sizeof(T), m_data, m_count * sizeof(T)); - LocalFree(m_data); + HeapFree(GetProcessHeap(), 0, m_data); } m_data = data; From 4fbf71977471a7f2b43d2650c4c0c16bcc2b626c Mon Sep 17 00:00:00 2001 From: Mohamed Shazan Date: Mon, 31 Aug 2026 03:17:43 +0530 Subject: [PATCH 2/2] Fix typo --- releases/v3.3.195/lib/GameInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/v3.3.195/lib/GameInput.cpp b/releases/v3.3.195/lib/GameInput.cpp index f7fc016..33410e9 100644 --- a/releases/v3.3.195/lib/GameInput.cpp +++ b/releases/v3.3.195/lib/GameInput.cpp @@ -74,7 +74,7 @@ class Vector { const size_t capacity = (m_capacity + count) * 2; - T* const data = static_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Capacity * sizeof(T)))); + T* const data = static_cast(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, capacity * sizeof(T)))); RETURN_IF_NULL_ALLOC(data); if (m_data != nullptr)