From c2a44a93b9f7986e5ecf3add41e1da10d7505eae Mon Sep 17 00:00:00 2001 From: DrPerkyLegit <116128211+DrPerkyLegit@users.noreply.github.com> Date: Tue, 23 Jun 2026 09:45:29 -0400 Subject: [PATCH] memory leak patch --- Minecraft.Client/Windows64/Windows64_Minecraft.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index d2251e4e..82361434 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -703,7 +703,9 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, #endif app.loadMediaArchive(); - RenderManager.Initialise(g_pd3dDevice, g_pSwapChain); + // @CDevJoud: No need to call this method as it gets called once in `InitDevice()` + // Calling it again and it results of 20MB of memory leak! + //RenderManager.Initialise(g_pd3dDevice, g_pSwapChain); app.loadStringTable(); ui.init(g_pd3dDevice,g_pImmediateContext,g_pRenderTargetView,g_pDepthStencilView,g_iScreenWidth,g_iScreenHeight);