diff --git a/CMakeLists.txt b/CMakeLists.txt index 495b27a90..caefe0694 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -369,10 +369,6 @@ if(WIN32) CONFIGURATIONS Debug ) if(PLATFORM MATCHES X86) - # Special thing for debug and 32-bit - set(WIN_DEBUGLIBS - ${CMAKE_SOURCE_DIR}/dep/lib/win32_debug/vld.lib - ) # Copy dll's Windows needs install( FILES @@ -382,7 +378,6 @@ if(WIN32) ) install( FILES - ${CMAKE_SOURCE_DIR}/dep/lib/win32_debug/vld.dll ${CMAKE_SOURCE_DIR}/dep/lib/win32_debug/dbghelp.dll DESTINATION ${LIBS_DIR} CONFIGURATIONS Debug diff --git a/dep/include/vld/vld.h b/dep/include/vld/vld.h deleted file mode 100644 index ffe675d7d..000000000 --- a/dep/include/vld/vld.h +++ /dev/null @@ -1,104 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// $Id: vld.h,v 1.27 2006/11/12 18:09:20 dmouldin Exp $ -// -// Visual Leak Detector (Version 1.9d) - Import Library Header -// Copyright (c) 2006 Dan Moulding -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -// -// See COPYING.txt for the full terms of the GNU Lesser General Public License. -// -//////////////////////////////////////////////////////////////////////////////// - -//#pragma once -#ifndef _VLD_H_ -#define _VLD_H_ - -#ifdef _DEBUG - -#pragma comment(lib, "vld.lib") - -// Force a symbolic reference to the global VisualLeakDetector class object from -// the DLL. This enusres that the DLL is loaded and linked with the program, -// even if no code otherwise imports any of the DLL's exports. -#pragma comment(linker, "/include:__imp_?vld@@3VVisualLeakDetector@@A") - -//////////////////////////////////////////////////////////////////////////////// -// -// Visual Leak Detector APIs -// - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// VLDDisable - Disables Visual Leak Detector's memory leak detection at -// runtime. If memory leak detection is already disabled, then calling this -// function has no effect. -// -// Note: In multithreaded programs, this function operates on a per-thread -// basis. In other words, if you call this function from one thread, then -// memory leak detection is only disabled for that thread. If memory leak -// detection is enabled for other threads, then it will remain enabled for -// those other threads. It was designed to work this way to insulate you, -// the programmer, from having to ensure thread synchronization when calling -// VLDEnable() and VLDDisable(). Without this, calling these two functions -// unsychronized could result in unpredictable and unintended behavior. -// But this also means that if you want to disable memory leak detection -// process-wide, then you need to call this function from every thread in -// the process. -// -// Return Value: -// -// None. -// - -__declspec(dllimport) void VLDDisable (); - -// VLDEnable - Enables Visual Leak Detector's memory leak detection at runtime. -// If memory leak detection is already enabled, which it is by default, then -// calling this function has no effect. -// -// Note: In multithreaded programs, this function operates on a per-thread -// basis. In other words, if you call this function from one thread, then -// memory leak detection is only enabled for that thread. If memory leak -// detection is disabled for other threads, then it will remain disabled for -// those other threads. It was designed to work this way to insulate you, -// the programmer, from having to ensure thread synchronization when calling -// VLDEnable() and VLDDisable(). Without this, calling these two functions -// unsychronized could result in unpredictable and unintended behavior. -// But this also means that if you want to enable memory leak detection -// process-wide, then you need to call this function from every thread in -// the process. -// -// Return Value: -// -// None. -// - -__declspec(dllimport) void VLDEnable (); - -#ifdef __cplusplus -} -#endif // __cplusplus - -#else // !_DEBUG - -#define VLDEnable() -#define VLDDisable() - -#endif // _DEBUG - -#endif // _VLD_H_ diff --git a/dep/lib/win32_debug/vld.dll b/dep/lib/win32_debug/vld.dll deleted file mode 100644 index dee162c54..000000000 Binary files a/dep/lib/win32_debug/vld.dll and /dev/null differ diff --git a/dep/lib/win32_debug/vld.lib b/dep/lib/win32_debug/vld.lib deleted file mode 100644 index 0cf374670..000000000 Binary files a/dep/lib/win32_debug/vld.lib and /dev/null differ diff --git a/src/mangosd/Main.cpp b/src/mangosd/Main.cpp index b41292991..f18fd7814 100644 --- a/src/mangosd/Main.cpp +++ b/src/mangosd/Main.cpp @@ -72,11 +72,6 @@ void usage(const char *prog) /// Launch the mangos server extern int main(int argc, char **argv) { - // - Construct Memory Manager Instance - MaNGOS::Singleton::Instance(); - - //char *leak = new char[1000]; // test leak detection - ///- Command line parsing char const* cfg_file = _MANGOSD_CONFIG; diff --git a/src/shared/Common.h b/src/shared/Common.h index 94d69652e..cd61d2d8d 100644 --- a/src/shared/Common.h +++ b/src/shared/Common.h @@ -62,9 +62,6 @@ #endif // __SHOW_STUPID_WARNINGS__ #endif // __GNUC__ -// must be the first thing to include for it to work -#include "MemoryLeaks.h" - #include "Utilities/UnorderedMapSet.h" #include #include @@ -109,11 +106,7 @@ typedef off_t ACE_OFF_T; # define FD_SETSIZE 4096 # endif # include -// XP winver - needed to compile with standard leak check in MemoryLeaks.h -// uncomment later if needed -//#define _WIN32_WINNT 0x0501 # include -//#undef WIN32_WINNT #else # include # include diff --git a/src/shared/MemoryLeaks.cpp b/src/shared/MemoryLeaks.cpp deleted file mode 100644 index 561bc83dc..000000000 --- a/src/shared/MemoryLeaks.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2005-2011 MaNGOS - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "MemoryLeaks.h" -#include "Policies/SingletonImp.h" - -INSTANTIATE_SINGLETON_1( MemoryManager ) ; - -MemoryManager::MemoryManager( ) -{ - #if COMPILER == MICROSOFT - // standard leak check initialization - //_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); - // uncomment to disable Visual Leak Detector from code - //VLDDisable(); - #endif -} diff --git a/src/shared/MemoryLeaks.h b/src/shared/MemoryLeaks.h deleted file mode 100644 index f60433141..000000000 --- a/src/shared/MemoryLeaks.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2005-2011 MaNGOS - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef MANGOSSERVER_MEMORY_H -#define MANGOSSERVER_MEMORY_H - -#include "Platform/CompilerDefs.h" - -#if COMPILER == COMPILER_MICROSOFT - -#ifndef _WIN64 -// Visual Leak Detector support enabled -//#include -// standard Visual Studio leak check disabled, -//# define _CRTDBG_MAP_ALLOC -//# include -//# include -#else -//# define _CRTDBG_MAP_ALLOC -//# include -//# include -#endif - -#endif - - -#include "Policies/Singleton.h" - -struct MemoryManager : public MaNGOS::Singleton < MemoryManager > -{ - MemoryManager(); -}; -#endif diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ae5b5e573..1daf4e79e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11282" + #define REVISION_NR "11283" #endif // __REVISION_NR_H__ diff --git a/win/VC100/shared.vcxproj b/win/VC100/shared.vcxproj index 8892b97cd..7fbffb554 100644 --- a/win/VC100/shared.vcxproj +++ b/win/VC100/shared.vcxproj @@ -443,7 +443,6 @@ - @@ -477,7 +476,6 @@ - diff --git a/win/VC100/shared.vcxproj.filters b/win/VC100/shared.vcxproj.filters index f316a941b..85f2946a6 100644 --- a/win/VC100/shared.vcxproj.filters +++ b/win/VC100/shared.vcxproj.filters @@ -48,9 +48,6 @@ Log - - Util - Util @@ -131,9 +128,6 @@ Util - - Util - Util diff --git a/win/VC80/shared.vcproj b/win/VC80/shared.vcproj index 6afe6fcf7..bed291448 100644 --- a/win/VC80/shared.vcproj +++ b/win/VC80/shared.vcproj @@ -624,14 +624,6 @@ RelativePath="..\..\src\shared\Errors.h" > - - - - diff --git a/win/VC90/shared.vcproj b/win/VC90/shared.vcproj index a75f8e4fa..ae7aec594 100644 --- a/win/VC90/shared.vcproj +++ b/win/VC90/shared.vcproj @@ -627,14 +627,6 @@ RelativePath="..\..\src\shared\Errors.h" > - - - -