revert console.h to best working version
wrap includes around the TORQUE_DISABLE_MEMORY_MANAGER macro
in torqueConfig.h.in add check for whether we are in release and make sure TORQUE_DISABLE_MEMORY_MANAGER is defined.
This commit is contained in:
marauder2k7 2025-05-10 21:59:05 +01:00
parent cb7dab4052
commit 5cc2abc9ae
3 changed files with 20 additions and 6 deletions

View file

@ -154,7 +154,7 @@ class ConsoleValue
TORQUE_FORCEINLINE bool hasAllocatedData() const
{
return (type == ConsoleValueType::cvString || isConsoleType()) && data != NULL;
return (isConsoleType() && data != NULL);
}
const char* getConsoleData() const;
@ -166,6 +166,12 @@ class ConsoleValue
dFree(data);
data = NULL;
}
else if (type == ConsoleValueType::cvString)
{
if (s != StringTable->EmptyString())
dFree(s);
}
type = ConsoleValueType::cvNULL;
}
public: