Changed: Memory leaks detection

This commit is contained in:
kervala 2016-12-09 13:51:09 +01:00
parent c05158f6de
commit de6bb36f73
45 changed files with 189 additions and 3 deletions

View file

@ -19,6 +19,9 @@
#include "nel/3d/animatable.h"
#include "nel/3d/channel_mixer.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NL3D
{

View file

@ -22,6 +22,10 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NL3D
{

View file

@ -21,6 +21,10 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NL3D
{

View file

@ -21,6 +21,10 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NL3D
{

View file

@ -22,6 +22,10 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NL3D
{

View file

@ -29,6 +29,10 @@
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NL3D
{

View file

@ -31,6 +31,9 @@
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NL3D
{

View file

@ -21,6 +21,10 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// This code is not used actually and doesn't compile
// just preproc comment it
#if 0

View file

@ -22,6 +22,10 @@
//using namespace NL3D;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NLLIGO
{

View file

@ -28,6 +28,10 @@ using namespace std;
const uint32 NLLIGO_PRIMITIVE_VERSION = 1;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NLLIGO
{

View file

@ -14,7 +14,15 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/types_nl.h"
#ifndef STDLIGO_H
#define STDLIGO_H
#if defined(_MSC_VER) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#endif
#include <algorithm>
#include <cmath>
@ -44,6 +52,7 @@
// Include from libxml2
#include <libxml/parser.h>
#include "nel/misc/types_nl.h"
#include "nel/misc/debug.h"
#include "nel/misc/common.h"
#include "nel/misc/fast_mem.h"
@ -67,3 +76,5 @@
#endif
#include <windows.h>
#endif
#endif

View file

@ -22,6 +22,10 @@
#include "nel/ligo/ligo_error.h"
#include "nel/ligo/ligo_material.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NLLIGO
{

View file

@ -28,6 +28,9 @@
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NLLIGO
{

View file

@ -25,6 +25,10 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NLLIGO
{

View file

@ -14,8 +14,15 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NL_STDMISC_H
#define NL_STDMISC_H
#ifndef NL_STDLOGIC_H
#define NL_STDLOGIC_H
#if defined(_MSC_VER) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#endif
#include <vector>
#include <map>
@ -24,6 +31,12 @@
#include <libxml/parser.h>
#include "nel/misc/types_nl.h"
#include "nel/misc/entity_id.h"
#include "nel/misc/i_xml.h"
#include "nel/misc/o_xml.h"
#include "nel/misc/stream.h"
#ifdef NL_OS_WINDOWS
# define WIN32_LEAN_AND_MEAN
# define _WIN32_WINDOWS 0x0500

View file

@ -27,6 +27,9 @@
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NLNET

View file

@ -63,6 +63,10 @@ typedef int SOCKET;
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace NLNET {

View file

@ -94,6 +94,10 @@ using namespace NLMISC;
using namespace NLLIGO;
using namespace NL3D;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// APP DATA
#define NEL3D_APPDATA_LIGO_USE_BOUNDINGBOX ((uint32)1342141818)

View file

@ -34,6 +34,10 @@
using namespace NLMISC;
using namespace NL3D;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
static Class_ID DefNoteTrackClassID(NOTETRACK_CLASS_ID, 0);
#define BOOL_CONTROL_CLASS_ID 0x984b8d27

View file

@ -1,6 +1,10 @@
#include "stdafx.h"
#include "editpat.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ------------------------------------------------------------------------------------------------------------------------------------------------------
#define DBGWELD_DUMPx

View file

@ -11,6 +11,10 @@ int controlsInit = FALSE;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
/** public functions **/
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{

View file

@ -32,6 +32,9 @@
using namespace NLMISC;
using namespace std;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#define TGA8 8
#define TGA16 16

View file

@ -137,6 +137,9 @@ using namespace std;
using namespace MBEHAV;
using namespace CLFECOMMON;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
////////////
// EXTERN //

View file

@ -65,6 +65,10 @@ using namespace NLNET;
// Macros
//
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
//
// RYZOM_TRY and RYZOM_CATCH aim is to catch differently in dev and final version
// In final version, we catch everything and nlerror the problem to display a NeL message box

View file

@ -46,6 +46,10 @@
using namespace NLMISC;
using namespace NL3D;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
////////////
// GLOBAL //

View file

@ -41,6 +41,10 @@
using namespace NL3D;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
CDecalRenderList DecalRenderList;
extern uint SkipFrame;

View file

@ -72,6 +72,9 @@ using namespace NLMISC;
using namespace NL3D;
using namespace std;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
////////////
// EXTERN //

View file

@ -50,6 +50,10 @@ extern NLMISC::CLog g_log;
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
CInterfaceItemEdition *CInterfaceItemEdition::_Instance = NULL;
// ********************************************************************************************

View file

@ -39,6 +39,10 @@
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ***************************************************************************
// ***************************************************************************
// ***************************************************************************

View file

@ -35,6 +35,10 @@ using namespace std;
using namespace NLMISC;
using namespace NL3D;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
extern NL3D::UCamera MainCam;
NLMISC_REGISTER_OBJECT(CViewBase, CViewRadar, std::string, "radar");

View file

@ -71,6 +71,10 @@ using namespace NLNET;
using namespace NL3D;
using namespace std;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ***************************************************************************
extern bool SetMousePosFirstTime;

View file

@ -159,6 +159,9 @@ using namespace NLPACS;
using namespace NLNET;
using namespace std;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif

View file

@ -29,6 +29,10 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace R2
{

View file

@ -101,6 +101,10 @@
using namespace NL3D;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
////////////
// EXTERN //
////////////

View file

@ -32,6 +32,9 @@ using namespace NLNET;
using namespace NLGEORGES;
using namespace std;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
NLMISC::CMemDisplayer *TmpDebugDisplayer = NULL;
//NLMISC::CLog *TmpDebugLogger = NULL;

View file

@ -33,6 +33,10 @@ using namespace std;
using namespace NLLIGO;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ***************************************************************************
#define SCROLLING_STEPS 2 // parameter to finetune the scroller

View file

@ -27,6 +27,10 @@ using namespace NLLIGO;
using namespace NL3D;
using namespace NLGEORGES;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ***************************************************************************
/*

View file

@ -24,6 +24,10 @@ using namespace std;
using namespace NLLIGO;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ***************************************************************************
bool EditExternalText (const std::string &editor, std::string &text, const std::string &ext)

View file

@ -26,6 +26,10 @@
using namespace NLLIGO;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
CString CFindPrimitiveDlg::Property = _T("");
CString CFindPrimitiveDlg::Value = _T("");
CString CFindPrimitiveDlg::ReplaceText = _T("");

View file

@ -22,6 +22,10 @@
#include "resource.h"
#include "generate_dlg.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
/////////////////////////////////////////////////////////////////////////////
// CGenerateDlg dialog

View file

@ -25,6 +25,10 @@
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#pragma warning (disable : 4786)
BOOL CALLBACK EnumResLangProc(HMODULE hModule, LPCSTR lpszType, LPCSTR lpszName, WORD wIDLanguage,

View file

@ -21,6 +21,10 @@
#include "world_editor.h"
#include "my_list_box.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#define COMBO_REAL_HEIGHT 300
// ***************************************************************************

View file

@ -25,6 +25,9 @@
#include "nel/misc/path.h"
#include "nel/misc/config_file.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
/////////////////////////////////////////////////////////////////////////////
// CNameDlg dialog

View file

@ -27,6 +27,10 @@ using namespace NLMISC;
using namespace NLLIGO;
using namespace NLPACS;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ***************************************************************************
CPacsManager PacsManager;

View file

@ -25,6 +25,10 @@
using namespace NLLIGO;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// ***************************************************************************
// CPrimitiveConfigurationDlg dialog
// ***************************************************************************