summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-05 21:45:27 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-05 21:45:27 +0000
commit4a43cb1c6e5ba304d70df7066c61c52718a5f249 (patch)
treed8aca0414b771cb2b7532d6f4f9d2ed87f77d703 /src/engine.cpp
parent8415f7791ea8dc84148c65d04c288d8d12eb50bf (diff)
downloadmana-4a43cb1c6e5ba304d70df7066c61c52718a5f249.tar.gz
mana-4a43cb1c6e5ba304d70df7066c61c52718a5f249.tar.bz2
mana-4a43cb1c6e5ba304d70df7066c61c52718a5f249.tar.xz
mana-4a43cb1c6e5ba304d70df7066c61c52718a5f249.zip
Fixed some resource cleanup and memory leaks. Also changed the way dangling
references to resources are reported to be more informative.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index c5bd9f10..1dd7c752 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -165,12 +165,16 @@ Engine::Engine():
weaponset = new Spriteset(weaponbitmap, 160, 120);
itemset = new Spriteset(itembitmap, 32, 32);
+ npcbmp->decRef();
+ emotionbmp->decRef();
+ weaponbitmap->decRef();
+ itembitmap->decRef();
+
attackTarget = resman->getImage("graphics/gui/attack_target.png");
if (!attackTarget) logger->error("Unable to load attack_target.png");
// Initialize item manager
itemDb = new ItemManager();
-
}
Engine::~Engine()