From 88c1d8252f7726201a78c11439f5e5f56959abc3 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Thu, 8 Jun 2017 20:32:41 +0200 Subject: [PATCH] [ZoneBuilder] Fix memory leak --- src/Components/Modules/ZoneBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Modules/ZoneBuilder.cpp b/src/Components/Modules/ZoneBuilder.cpp index ab583818..7c9f82ba 100644 --- a/src/Components/Modules/ZoneBuilder.cpp +++ b/src/Components/Modules/ZoneBuilder.cpp @@ -1047,7 +1047,7 @@ namespace Components // patch g_copyInfo because we're using so many more assets than originally intended int newLimit = 0x2000; - int* g_copyInfo_new = Utils::Memory::AllocateArray(newLimit); + int* g_copyInfo_new = Utils::Memory::GetAllocator()->allocateArray(newLimit); Utils::Hook::Set(0x494083, g_copyInfo_new); // DB_DelayLoadImages Utils::Hook::Set(0x5BB9CC, g_copyInfo_new); // DB_AddXAsset Utils::Hook::Set(0x5BC723, g_copyInfo_new); // DB_PostLoadXZone