Skip to content

Commit

Permalink
Attempting to locate memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Sep 27, 2010
1 parent c038158 commit 105c37b
Show file tree
Hide file tree
Showing 115 changed files with 134 additions and 156 deletions.
2 changes: 1 addition & 1 deletion ActivityDoc.cpp
Expand Up @@ -6,7 +6,7 @@
#include "ActivityDoc.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion ActivityView.cpp
Expand Up @@ -12,7 +12,7 @@
#include "winplace.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Color.cpp
Expand Up @@ -15,7 +15,7 @@ Hinweis: (C) 1999 by Christian Rodemeyer
#include <math.h>

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion DDV_validation.cpp
Expand Up @@ -2,7 +2,7 @@
#include "resource.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Finding.cpp
Expand Up @@ -9,7 +9,7 @@
#include "dialogs\ProgDlg.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion HyprLink.cpp
Expand Up @@ -7,7 +7,7 @@
#include "HyprLink.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Line.cpp
Expand Up @@ -4,7 +4,7 @@
#include "doc.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
11 changes: 6 additions & 5 deletions MUSHclient.cpp
Expand Up @@ -43,7 +43,7 @@ COLORREF xterm_256_colours [256];
#pragma comment( lib, "ws2_32.lib ")

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down Expand Up @@ -176,7 +176,6 @@ IMPLEMENT_OLECREATE(CMUSHclientApp, "MUSHclient.Application",
*/

//#define new DEBUG_NEW

/////////////////////////////////////////////////////////////////////////////
// CMUSHclientApp construction
Expand Down Expand Up @@ -364,9 +363,11 @@ BOOL CMUSHclientApp::InitInstance()
return FALSE; // no resources, or Lua won't start up

// as at version 3.13
// int i = sizeof (CLine); // 56 bytes
// int j = sizeof (CStyle); // 20 bytes
// int k = sizeof (CAction); // 28 bytes
// {
// int i = sizeof (CLine); // 80 bytes
// int j = sizeof (CStyle); // 20 bytes
// int k = sizeof (CAction); // 28 bytes
// }

// memory state tracking
#ifdef _DEBUG
Expand Down
28 changes: 14 additions & 14 deletions MUSHclient.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Mapping.cpp
Expand Up @@ -8,7 +8,7 @@
#include "mainfrm.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion MySplitterWnd.cpp
Expand Up @@ -11,7 +11,7 @@
#include "sendvw.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion MyStatusBar.cpp
Expand Up @@ -7,7 +7,7 @@
#include "MyStatusBar.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion NameGeneration.cpp
Expand Up @@ -2,7 +2,7 @@
#include "MUSHclient.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion ProcessPreviousLine.cpp
Expand Up @@ -9,7 +9,7 @@
#include "scripting\errors.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Replace.cpp
Expand Up @@ -4,7 +4,7 @@
#include "stdafx.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion StatLink.cpp
Expand Up @@ -11,7 +11,7 @@
#include "StatLink.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
3 changes: 2 additions & 1 deletion TextDocument.cpp
@@ -1,6 +1,7 @@
// TextDocument.cpp : implementation file
//


/*
Copyright (c) 2000 Nick Gammon.
Expand All @@ -15,7 +16,7 @@ Copyright (c) 2000 Nick Gammon.
#include "doc.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion TimerWnd.cpp
Expand Up @@ -6,7 +6,7 @@
#include "doc.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Utilities.cpp
Expand Up @@ -21,7 +21,7 @@
#include "png\png.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion accelerators.cpp
Expand Up @@ -6,7 +6,7 @@
#include "doc.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
4 changes: 1 addition & 3 deletions activitychildfrm.cpp
Expand Up @@ -8,7 +8,7 @@
#include "activitychildfrm.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand All @@ -23,8 +23,6 @@ BEGIN_MESSAGE_MAP(CActivityChildFrame, CMDIChildWnd)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

//#define new DEBUG_NEW

/////////////////////////////////////////////////////////////////////////////
// CActivityChildFrame construction/destruction

Expand Down
2 changes: 1 addition & 1 deletion art.cpp
Expand Up @@ -22,7 +22,7 @@
#include "dialogs\AsciiArtDlg.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand Down
4 changes: 1 addition & 3 deletions chatlistensock.cpp
Expand Up @@ -12,15 +12,13 @@
#include <stddef.h>

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

IMPLEMENT_DYNAMIC(CChatListenSocket, CAsyncSocket)

//#define new DEBUG_NEW

CChatListenSocket::CChatListenSocket(CMUSHclientDoc* pDoc)
{
m_pDoc = pDoc;
Expand Down
4 changes: 1 addition & 3 deletions chatsock.cpp
Expand Up @@ -15,7 +15,7 @@
#include <stddef.h>

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand All @@ -24,8 +24,6 @@ static char BASED_CODE THIS_FILE[] = __FILE__;

IMPLEMENT_DYNAMIC(CChatSocket, CAsyncSocket)

//#define new DEBUG_NEW

CChatSocket::CChatSocket(CMUSHclientDoc* pDoc)
{
m_pDoc = pDoc;
Expand Down
4 changes: 1 addition & 3 deletions childfrm.cpp
Expand Up @@ -14,7 +14,7 @@
#include "winplace.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
Expand All @@ -32,8 +32,6 @@ BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNeedText)
END_MESSAGE_MAP()

//#define new DEBUG_NEW

/////////////////////////////////////////////////////////////////////////////
// CChildFrame construction/destruction

Expand Down
2 changes: 1 addition & 1 deletion dialogs/AsciiArtDlg.cpp
Expand Up @@ -6,7 +6,7 @@
#include "AsciiArtDlg.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion dialogs/ChooseNotepadDlg.cpp
Expand Up @@ -8,7 +8,7 @@
#include "ChooseNotepadDlg.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion dialogs/ColourComboBox.cpp
Expand Up @@ -6,7 +6,7 @@
#include "ColourComboBox.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion dialogs/ColourPickerDlg.cpp
Expand Up @@ -8,7 +8,7 @@
#include "..\Color.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion dialogs/ConfirmPreamble.cpp
Expand Up @@ -6,7 +6,7 @@
#include "ConfirmPreamble.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion dialogs/CreditsDlg.cpp
Expand Up @@ -6,7 +6,7 @@
#include "CreditsDlg.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down
2 changes: 1 addition & 1 deletion dialogs/DebugWorldInputDlg.cpp
Expand Up @@ -8,7 +8,7 @@
#include "..\doc.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Expand Down

0 comments on commit 105c37b

Please sign in to comment.