diff options
author | Mattes D <github@xoft.cz> | 2017-06-19 11:05:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 11:05:19 +0200 |
commit | 7ac3b0fa0b22cb531667995099afd5eea8607884 (patch) | |
tree | 79634067fdfd779cf8a5409d9f04279ee7cfdb93 /src/Server.cpp | |
parent | NetworkSingleton: Fixed an object leak upon termination. (diff) | |
download | cuberite-7ac3b0fa0b22cb531667995099afd5eea8607884.tar cuberite-7ac3b0fa0b22cb531667995099afd5eea8607884.tar.gz cuberite-7ac3b0fa0b22cb531667995099afd5eea8607884.tar.bz2 cuberite-7ac3b0fa0b22cb531667995099afd5eea8607884.tar.lz cuberite-7ac3b0fa0b22cb531667995099afd5eea8607884.tar.xz cuberite-7ac3b0fa0b22cb531667995099afd5eea8607884.tar.zst cuberite-7ac3b0fa0b22cb531667995099afd5eea8607884.zip |
Diffstat (limited to 'src/Server.cpp')
-rw-r--r-- | src/Server.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/Server.cpp b/src/Server.cpp index 6d56a5890..fd707e61a 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -34,22 +34,6 @@ extern "C" -/** Enable the memory leak finder - needed for the "dumpmem" server command: -Synchronize this with main.cpp - the leak finder needs initialization before it can be used to dump memory -_X 2014_02_20: Disabled for canon repo, it makes the debug version too slow in MSVC2013 -and we haven't had a memory leak for over a year anyway. */ -// #define ENABLE_LEAK_FINDER - -#if defined(_MSC_VER) && defined(_DEBUG) && defined(ENABLE_LEAK_FINDER) - #pragma warning(push) - #pragma warning(disable:4100) - #include "LeakFinder.h" - #pragma warning(pop) -#endif - - - - typedef std::list< cClientHandle* > ClientList; @@ -535,23 +519,6 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac a_Output.Finished(); return; } - #if defined(_MSC_VER) && defined(_DEBUG) && defined(ENABLE_LEAK_FINDER) - else if (split[0].compare("dumpmem") == 0) - { - LeakFinderXmlOutput Output("memdump.xml"); - DumpUsedMemory(&Output); - return; - } - - else if (split[0].compare("killmem") == 0) - { - for (;;) - { - new char[100 * 1024 * 1024]; // Allocate and leak 100 MiB in a loop -> fill memory and kill MCS - } - } - #endif - else if (cPluginManager::Get()->ExecuteConsoleCommand(split, a_Output, a_Cmd)) { a_Output.Finished(); @@ -637,10 +604,6 @@ void cServer::BindBuiltInConsoleCommands(void) PlgMgr->BindConsoleCommand("load", nullptr, handler, "Adds and enables the specified plugin"); PlgMgr->BindConsoleCommand("unload", nullptr, handler, "Disables the specified plugin"); PlgMgr->BindConsoleCommand("destroyentities", nullptr, handler, "Destroys all entities in all worlds"); - - #if defined(_MSC_VER) && defined(_DEBUG) && defined(ENABLE_LEAK_FINDER) - PlgMgr->BindConsoleCommand("dumpmem", nullptr, handler, " - Dumps all used memory blocks together with their callstacks into memdump.xml"); - #endif } |