diff options
| author | Caldfir | 2012-05-26 14:09:40 -0700 |
|---|---|---|
| committer | Caldfir | 2012-05-26 14:09:40 -0700 |
| commit | f297adab478e2bf248b9f12091944ba47df4f2f2 (patch) | |
| tree | 72635053b1c4ee480cc241f49aec9a5809ccdb5a /main.cpp | |
| parent | c884d22b764b1c7dc090a5bf3be120bb9e65eceb (diff) | |
| download | stonesense-f297adab478e2bf248b9f12091944ba47df4f2f2.tar.gz stonesense-f297adab478e2bf248b9f12091944ba47df4f2f2.tar.bz2 stonesense-f297adab478e2bf248b9f12091944ba47df4f2f2.tar.xz | |
Removed a memory leak associated with blocks that were being permanently cached.
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -6,6 +6,7 @@ using namespace std; #include "common.h"
#include "Block.h"
+#include "BlockFactory.h"
#include "GUI.h"
//#include "SpriteMaps.h"
#include "GameBuildings.h"
@@ -521,6 +522,9 @@ static void * stonesense_thread(ALLEGRO_THREAD * main_thread, void * parms) delete last;
}
+ //need to explicitly tear down the current block factory
+ blockFactory.~BlockFactory();
+
al_destroy_bitmap(IMGIcon);
IMGIcon = 0;
delete contentLoader;
|
