diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-24 00:38:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-24 00:38:44 +0300 |
commit | d2c42029b98c665725768b891aa877eb3267664f (patch) | |
tree | b232b9a20e45ecb4e7ec2133d7806669054708a6 /src/utils | |
parent | fe39570810969993f51a0ff6045d0a5d4397a5e5 (diff) | |
download | ManaVerse-d2c42029b98c665725768b891aa877eb3267664f.tar.gz ManaVerse-d2c42029b98c665725768b891aa877eb3267664f.tar.bz2 ManaVerse-d2c42029b98c665725768b891aa877eb3267664f.tar.xz ManaVerse-d2c42029b98c665725768b891aa877eb3267664f.zip |
Add simple memory leak detector.
Can be enabled by configure option -enable-memdebug=yes.
Known issue: not all memory allocations hooked with it.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/base64.cpp | 2 | ||||
-rw-r--r-- | src/utils/copynpaste.cpp | 2 | ||||
-rw-r--r-- | src/utils/mkdir.cpp | 2 | ||||
-rw-r--r-- | src/utils/sha256.cpp | 2 | ||||
-rw-r--r-- | src/utils/specialfolder.cpp | 2 | ||||
-rw-r--r-- | src/utils/stringutils.cpp | 2 | ||||
-rw-r--r-- | src/utils/xml.cpp | 2 |
7 files changed, 14 insertions, 0 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp index cdd928105..d3563fb78 100644 --- a/src/utils/base64.cpp +++ b/src/utils/base64.cpp @@ -32,6 +32,8 @@ #include <stdlib.h> #include <string.h> +#include "debug.h" + static char base64_table[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp index 06c959017..58740a243 100644 --- a/src/utils/copynpaste.cpp +++ b/src/utils/copynpaste.cpp @@ -35,6 +35,8 @@ #include <SDL_syswm.h> #include "copynpaste.h" +#include "debug.h" + #ifdef WIN32 bool retrieveBuffer(std::string& text, std::string::size_type& pos) { diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp index d8962f0cd..a031fe717 100644 --- a/src/utils/mkdir.cpp +++ b/src/utils/mkdir.cpp @@ -37,6 +37,8 @@ #include "utils/mkdir.h" +#include "debug.h" + #if defined WIN32 int mkdir_r(const char *pathname) { diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp index b38bbb7db..6bad8c5e4 100644 --- a/src/utils/sha256.cpp +++ b/src/utils/sha256.cpp @@ -83,6 +83,8 @@ typedef unsigned char uint8_t; typedef unsigned int uint32_t; #endif +#include "debug.h" + #define SHA256_BLOCK_SIZE (512 / 8) /** An sha 256 context, used by original m_opersha256 */ diff --git a/src/utils/specialfolder.cpp b/src/utils/specialfolder.cpp index 864615181..5ac06848f 100644 --- a/src/utils/specialfolder.cpp +++ b/src/utils/specialfolder.cpp @@ -29,6 +29,8 @@ #include <iostream> #endif +#include "debug.h" + /* * Retrieve the pathname of special folders on win32, or an empty string * on error / if the folder does not exist. diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index d9eca557d..5e45b6168 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -28,6 +28,8 @@ #include <cstdio> #include <list> +#include "debug.h" + static int UTF8_MAX_SIZE = 10; std::string &trim(std::string &str) diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index 0ffd2acfc..b31b60ee1 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -30,6 +30,8 @@ #include <fstream> #include <cstring> +#include "debug.h" + namespace XML { Document::Document(const std::string &filename, bool useResman): |