From 2b14e5448e5676b7dedcaa0ed1876fe3152d9581 Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Sun, 11 May 2025 15:53:55 +0100 Subject: [PATCH] Revert "update" This reverts commit 7ac9c55bf1efa23db674dba4f2c7ada7ca344d7d. --- Engine/source/console/console.h | 8 +------- Engine/source/platform/platformMemory.cpp | 14 +++++--------- Tools/CMake/torqueConfig.h.in | 4 ---- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/Engine/source/console/console.h b/Engine/source/console/console.h index e5ba8ffe7..6a1dc7942 100644 --- a/Engine/source/console/console.h +++ b/Engine/source/console/console.h @@ -154,7 +154,7 @@ class ConsoleValue TORQUE_FORCEINLINE bool hasAllocatedData() const { - return (isConsoleType() && data != NULL); + return (type == ConsoleValueType::cvString || isConsoleType()) && data != NULL; } const char* getConsoleData() const; @@ -166,12 +166,6 @@ class ConsoleValue dFree(data); data = NULL; } - else if (type == ConsoleValueType::cvString) - { - if (s != StringTable->EmptyString()) - dFree(s); - } - type = ConsoleValueType::cvNULL; } public: diff --git a/Engine/source/platform/platformMemory.cpp b/Engine/source/platform/platformMemory.cpp index 557482412..14fd4d02f 100644 --- a/Engine/source/platform/platformMemory.cpp +++ b/Engine/source/platform/platformMemory.cpp @@ -30,8 +30,6 @@ #include "platform/threads/mutex.h" #include "core/module.h" -#if !defined(TORQUE_DISABLE_MEMORY_MANAGER) - #ifdef _WIN32 #include #include @@ -42,8 +40,6 @@ #include #include -#endif - // If profile paths are enabled, disable profiling of the // memory manager as that would cause a cyclic dependency // through the string table's allocation stuff used by the @@ -181,11 +177,11 @@ namespace Memory #endif } - if (report.find("getDocsLink") != std::string::npos) - { - //known issue. one off allocation - memLog[curRep].skip = true; - } + //if (report.find("getDocsLink") != std::string::npos) + //{ + // //known issue. one off allocation + // memLog[curRep].skip = true; + //} for (U32 oldRep = start; oldRep < curRep; ++oldRep) { diff --git a/Tools/CMake/torqueConfig.h.in b/Tools/CMake/torqueConfig.h.in index b96a7c7d1..717c05eb1 100644 --- a/Tools/CMake/torqueConfig.h.in +++ b/Tools/CMake/torqueConfig.h.in @@ -56,10 +56,6 @@ /// Define me if you want to disable Torque memory manager. #cmakedefine TORQUE_DISABLE_MEMORY_MANAGER -#ifdef TORQUE_RELEASE -#define TORQUE_DISABLE_MEMORY_MANAGER -#endif - /// Define me if you want to disable the virtual mount system. #cmakedefine TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM