From a2e1b5fd57ac9bbc50a6c2a8a14a0c9fc93fd040 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 10 Aug 2010 05:03:06 +0000 Subject: [PATCH] - added a code warning comment to avoid memory issues in the future --- source/glest_game/game/game.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 568f8ad9..8a421a5c 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -109,6 +109,9 @@ Game::~Game(){ SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); + // MUST DO THIS LAST!!!! Because objects above have pointers to things like + // unit particles and fade them out etc and this end method deletes the original + // object pointers. renderer.endGame(); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);