aboutsummaryrefslogtreecommitdiff
path: root/sword1/resman.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2004-11-09 04:06:10 +0000
committerRobert Göffringmann2004-11-09 04:06:10 +0000
commit021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f (patch)
tree44168e257d52b634893f7d01e3ed717fb0326bef /sword1/resman.cpp
parentdaee2edcfea567456bc94534e1cadcd988b6ad69 (diff)
downloadscummvm-rg350-021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f.tar.gz
scummvm-rg350-021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f.tar.bz2
scummvm-rg350-021f2cbccedfd2ed197bb4c54c3d5cf1fc3ca89f.zip
free memory on quit.
Still leaks some, though svn-id: r15735
Diffstat (limited to 'sword1/resman.cpp')
-rw-r--r--sword1/resman.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/sword1/resman.cpp b/sword1/resman.cpp
index 41665cc5df..ecb53ffe0b 100644
--- a/sword1/resman.cpp
+++ b/sword1/resman.cpp
@@ -52,6 +52,25 @@ ResMan::ResMan(const char *resFile, MemMan *pMemoMan) {
}
ResMan::~ResMan(void) {
+#if 0
+ for (uint32 clusCnt = 0; clusCnt < _prj.noClu; clusCnt++) {
+ Clu *cluster = _prj.clu[clusCnt];
+ if (cluster) {
+ for (uint32 grpCnt = 0; grpCnt < cluster->noGrp; grpCnt++) {
+ Grp *group = cluster->grp[grpCnt];
+ if (group) {
+ for (uint32 resCnt = 0; resCnt < group->noRes; resCnt++) {
+ if (group->resHandle[resCnt].cond == MEM_DONT_FREE) {
+ warning("ResMan::~ResMan: Resource %02X.%04X.%02X is still open",
+ clusCnt + 1, grpCnt, resCnt);
+ }
+ }
+ }
+ }
+ }
+ }
+ debug(0, "ResMan closed\n");
+#endif
freeCluDescript();
}