Changed: More memory leaks detection

--HG--
branch : develop
This commit is contained in:
kervala 2017-11-05 18:30:30 +01:00
parent c1188a9e25
commit f1cdcd1654
61 changed files with 264 additions and 20 deletions

View file

@ -32,6 +32,10 @@
# include <netinet/in.h>
#endif
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace std;

View file

@ -121,6 +121,10 @@ BOOLEAN IN6_IS_ADDR_UNSPECIFIED(CONST IN6_ADDR *a)
using namespace std;
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
#endif

View file

@ -24,6 +24,10 @@
#include "nel/net/module_gateway.h"
#include "nel/net/module_socket.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;
using namespace NLNET;

View file

@ -17,20 +17,11 @@
#ifndef NL_STDNET_H
#define NL_STDNET_H
#include "nel/misc/types_nl.h"
#ifdef NL_OS_WINDOWS
# define WIN32_LEAN_AND_MEAN
# define _WIN32_WINDOWS 0x0500
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0500
# endif
# ifndef NL_COMP_MINGW
# define WINVER 0x0500
# define NOMINMAX
# endif
# include <WinSock2.h>
# include <Windows.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 <map>
@ -55,6 +46,7 @@
#include <errno.h>
#include "nel/misc/types_nl.h"
#include "nel/misc/debug.h"
#include "nel/misc/common.h"
#include "nel/misc/stream.h"
@ -64,4 +56,18 @@
#include "nel/misc/mem_stream.h"
#include "nel/misc/hierarchical_timer.h"
#ifdef NL_OS_WINDOWS
# define WIN32_LEAN_AND_MEAN
# define _WIN32_WINDOWS 0x0500
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0500
# endif
# ifndef NL_COMP_MINGW
# define WINVER 0x0500
# define NOMINMAX
# endif
# include <WinSock2.h>
# include <Windows.h>
#endif
#endif

View file

@ -33,6 +33,9 @@
#include "nel/net/transport_class.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
//
// Namespace

View file

@ -19,6 +19,10 @@
#include "nel/misc/file.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace std;

View file

@ -56,6 +56,10 @@
#include "nel/sound/containers.h"
#include "nel/sound/audio_decoder.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;

View file

@ -33,6 +33,10 @@
#include "nel/georges/load_form.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;
using namespace NLGEORGES;

View file

@ -14,9 +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"
#include "nel/misc/common.h"
#include "nel/misc/debug.h"
#ifndef SOUND_STDPCH_H
#define SOUND_STDPCH_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 <cstdlib>
#include <cstdio>
@ -40,6 +46,11 @@
#include <libxml/parser.h>
#include "nel/misc/types_nl.h"
#include "nel/misc/common.h"
#include "nel/misc/debug.h"
#include "nel/misc/vector.h"
#include "nel/misc/path.h"
#include "nel/misc/file.h"
#endif

View file

@ -45,6 +45,12 @@
#include "login_progress_post_thread.h"
#include "interface_v3/action_handler_base.h"
#include "item_group_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace NLNET;
using namespace NL3D;

View file

@ -45,6 +45,9 @@
#include "client_sheets/plant_sheet.h"
#include <memory>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#define RZ_PRIM_ZEXT_BLOCK_AVOIDANCE 2.0f

View file

@ -114,6 +114,10 @@ extern HWND SlashScreen;
#include <new>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

View file

@ -35,6 +35,10 @@
#include "skill_manager.h"
#include "game_share/bot_chat_types.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;

View file

@ -37,6 +37,9 @@
//
#include "../r2/editor.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// Using //

View file

@ -31,6 +31,9 @@
#include "nel/misc/debug.h"
#include "nel/misc/system_info.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

View file

@ -89,6 +89,9 @@
// Std.
#include <vector>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#define OLD_STRING_SYSTEM
#define BAR_STEP_TP 2

View file

@ -98,6 +98,11 @@ using namespace CLFECOMMON;
#include <nel/misc/path.h>
#include <nel/misc/time_nl.h>
#include <nel/misc/command.h>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// Stat: array of vectors of cycles when a pos is received, indexed by TCLEntityId
struct TRDateState
{
@ -215,6 +220,12 @@ NLMISC_COMMAND( displayReceiveLog, "Flush the receive log into ReceiveLog.log",
return true;
}
#else
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
#endif // MEASURE_RECEIVE_DATES
extern NL3D::UDriver *Driver;

View file

@ -27,6 +27,10 @@
#include "ig_callback.h"
#include "ig_client.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

View file

@ -21,6 +21,10 @@
#include "time_client.h"
#include "nel/misc/time_nl.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
// *************************************************************************************************
CScalableTime::CScalableTime()
{

View file

@ -20,6 +20,10 @@
#include "game_share/r2_share_itf.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;
using namespace NLNET;

View file

@ -34,6 +34,10 @@
//
#include "game_share/shard_names.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;
using namespace RSMGR;

View file

@ -40,6 +40,9 @@
// Game Share
#include "game_share/visual_slot_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

View file

@ -19,6 +19,10 @@
#include "sky.h"
#include "client_sheets/sky_sheet.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NL3D;
using namespace NLMISC;

View file

@ -22,6 +22,10 @@
#include "nel/3d/u_instance_material.h"
#include "sky_material_setup.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NL3D;
H_AUTO_DECL(RZ_SkyMaterialSetup)

View file

@ -26,6 +26,10 @@
#include "sky_object.h"
#include "sky.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace NL3D;

View file

@ -32,6 +32,9 @@
#include "light_cycle_manager.h"
#include "global.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_SkyRender)

View file

@ -53,6 +53,10 @@
# include "view.h"
#endif
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
extern CLightCycleManager LightCycleManager;
extern NL3D::UDriver *Driver;
extern NL3D::UCamera MainCam;

View file

@ -24,6 +24,9 @@
#include "stage.h"
#include "game_share/entity_types.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

View file

@ -19,6 +19,9 @@
#include "stdpch.h"
#include "streamable_entity.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_StreamableEntity)

View file

@ -21,6 +21,10 @@
#include "streamable_entity_composite.h"
#include "nel/misc/progress_callback.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_StremableEntityComposite)
//===============================================================================

View file

@ -28,6 +28,10 @@
#include "streamable_ig.h"
#include "continent_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
extern CContinentManager ContinentMngr;
H_AUTO_DECL(RZ_StremableIG)

View file

@ -27,6 +27,10 @@
#include "misc.h"
#include "entity_cl.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;

View file

@ -29,6 +29,9 @@
#include "nel/georges/u_form_elm.h"
#include "nel/georges/u_form_loader.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

View file

@ -25,6 +25,10 @@
#include "text_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

View file

@ -34,6 +34,9 @@
#include "weather.h"
#include "game_share/light_cycle.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //

View file

@ -32,8 +32,8 @@
#include "nel/misc/check_fpu.h"
#if defined(NL_DEBUG) && defined(NL_OS_WINDOWS)
#include <crtdbg.h>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std::rel_ops;

View file

@ -47,6 +47,10 @@
#define RYZOM_CLIENT_ICON "ryzom_client"
#endif
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
std::string getUserAgent()
{
return getUserAgentName() + "/" + getUserAgentVersion();

View file

@ -80,6 +80,10 @@
// r2
#include "r2/editor.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
///////////
// USING //
///////////

View file

@ -37,6 +37,10 @@
#include "motion/user_controls.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using NL3D::UVisualCollisionManager;
extern UVisualCollisionManager *CollisionManager;

View file

@ -33,6 +33,10 @@
#include "pacs_client.h"
#include "client_cfg.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace std;

View file

@ -27,6 +27,10 @@
#include "nel/misc/matrix.h"
#include "nel/misc/vectord.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NL3D;
using namespace NLMISC;

View file

@ -31,6 +31,9 @@
#include "nel/misc/path.h"
#include "nel/misc/file.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
extern NL3D::UScene *Scene;
extern NL3D::UDriver *Driver;

View file

@ -36,6 +36,9 @@
//
#include "r2/editor.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_Weather)

View file

@ -31,6 +31,10 @@
#include "sound_manager.h"
#include "client_cfg.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_WeatherManagerClient)
using namespace NLMISC;

View file

@ -25,6 +25,9 @@
using namespace NLMISC;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
H_AUTO_DECL(RZ_WeatherSetupClient)

View file

@ -25,6 +25,9 @@
#include "world_database_manager.h"
#include "continent_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
/////////////
// GLOBALS //

View file

@ -23,6 +23,9 @@
using namespace std;
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
bool getPosFromZoneName(const std::string &name,NLMISC::CVector2f &dest)
{

View file

@ -45,6 +45,9 @@
#include "server_edition_module.h"
#include "server_animation_module.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace R2;
using namespace NLNET;

View file

@ -17,6 +17,10 @@
#include "stdpch.h"
#include "dyn_chat.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
NL_INSTANCE_COUNTER_IMPL(CDynChatSession);

View file

@ -24,6 +24,10 @@
//#include "../entities_game_service/egs_variables.h"
//#include "pvp_clan.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;
using namespace STRING_MANAGER;

View file

@ -22,6 +22,10 @@
#include "nel/misc/file.h"
#include "nel/misc/xml_auto_ptr.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;

View file

@ -21,6 +21,10 @@
#include "synchronised_message.h"
#include "tick_proxy_time_measure.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace NLNET;
using namespace std;

View file

@ -19,6 +19,9 @@
#include "stdpch.h"
#include "mirror_prop_value.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
sint32 NbAllocdListCells = 0;
sint32 MaxNbAllocdListCells = 0;

View file

@ -25,6 +25,10 @@
#include <zlib.h>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
namespace R2
{

View file

@ -77,6 +77,9 @@
#include "stdpch.h"
#include "persistent_data_tree.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
//-----------------------------------------------------------------------------
// Namespaces

View file

@ -35,6 +35,9 @@
#include "nel/misc/xml_auto_ptr.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace R2;

View file

@ -31,6 +31,10 @@
#include "nel/misc/file.h"
#include "nel/misc/algo.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace R2;
//----------------------------------------------------------------
namespace R2

View file

@ -60,6 +60,9 @@
//#include "server_admin_module.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace std;
using namespace NLMISC;

View file

@ -22,6 +22,10 @@
// Includes
//
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
//
// Using
//

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 GAMESHARE_STDPCH_H
#define GAMESHARE_STDPCH_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 <stdlib.h>
#include <stdio.h>
@ -38,6 +46,7 @@
#include <memory>
#include <functional>
#include "nel/misc/types_nl.h"
#include <nel/misc/common.h>
#include <nel/misc/debug.h>
@ -75,3 +84,5 @@
# include <WinSock2.h>
# include <Windows.h>
#endif
#endif

View file

@ -30,6 +30,10 @@
#include "visual_slot_manager.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
////////////////////
// STATIC MEMBERS //
////////////////////