mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
update
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:
parent
cb7dab4052
commit
5cc2abc9ae
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
#include "platform/threads/mutex.h"
|
||||
#include "core/module.h"
|
||||
|
||||
#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
|
|
@ -40,6 +42,8 @@
|
|||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
#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
|
||||
|
|
@ -177,11 +181,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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@
|
|||
/// 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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue