summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-09-16 20:00:25 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-09-16 20:00:25 +0200
commit2e21435f432191afa1b0f609daa8ca9d4cde1e93 (patch)
treef59b3d80815c2017f4992f0d26e41a439d75e30b /src/object
parent6a0d150539897ec65ccc161305db48de10ea35ba (diff)
downloadcolobot-2e21435f432191afa1b0f609daa8ca9d4cde1e93.tar.gz
colobot-2e21435f432191afa1b0f609daa8ca9d4cde1e93.tar.bz2
colobot-2e21435f432191afa1b0f609daa8ca9d4cde1e93.zip
Some memory leaks fixed
Diffstat (limited to 'src/object')
-rw-r--r--src/object/robotmain.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 1c61574..b6aedaa 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -642,6 +642,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan, CApplication* app)
m_selectObject = 0;
m_infoUsed = 0;
+ m_immediatSatCom = false;
m_beginSatCom = false;
m_movieLock = false;
m_satComLock = false;
@@ -815,11 +816,32 @@ CRobotMain::CRobotMain(CInstanceManager* iMan, CApplication* app)
//! Destructor of robot application
CRobotMain::~CRobotMain()
{
+ delete m_displayText;
+ m_displayText = nullptr;
+
+ delete m_interface;
+ m_interface = nullptr;
+
+ delete m_terrain;
+ m_terrain = nullptr;
+
+ delete m_camera;
+ m_camera = nullptr;
+
+ delete m_displayText;
+ m_displayText = nullptr;
+
delete m_movie;
+ m_movie = nullptr;
+
delete m_dialog;
+ m_dialog = nullptr;
+
delete m_short;
+ m_short = nullptr;
+
delete m_map;
- delete m_terrain;
+ m_map = nullptr;
m_iMan = nullptr;
m_app = nullptr;
@@ -2707,7 +2729,7 @@ void CRobotMain::HiliteObject(Math::Point pos)
if (obj == nullptr)
{
- bool inMap;
+ bool inMap = false;
obj = m_map->DetectMap(pos, inMap);
if (obj == nullptr)
{