diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-15 00:32:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-15 00:32:07 +0300 |
commit | 57288890689bfa2c2d35882169a539813be621f1 (patch) | |
tree | 8c2886837e997d073906cb85aee38c9d77a8069b /src/utils/physfsrwops.cpp | |
parent | 53947c9d39440424dcf815ea5df130e833457437 (diff) | |
download | mv-57288890689bfa2c2d35882169a539813be621f1.tar.gz mv-57288890689bfa2c2d35882169a539813be621f1.tar.bz2 mv-57288890689bfa2c2d35882169a539813be621f1.tar.xz mv-57288890689bfa2c2d35882169a539813be621f1.zip |
add RWops leaks reporting.
Diffstat (limited to 'src/utils/physfsrwops.cpp')
-rw-r--r-- | src/utils/physfsrwops.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/physfsrwops.cpp b/src/utils/physfsrwops.cpp index 022e8160f..aa5caf7c7 100644 --- a/src/utils/physfsrwops.cpp +++ b/src/utils/physfsrwops.cpp @@ -27,6 +27,7 @@ #include "logger.h" #include "utils/fuzzer.h" +#include "utils/physfscheckutils.h" #include <stdio.h> @@ -161,6 +162,9 @@ static int physfsrwops_close(SDL_RWops *const rw) logger->log("closing already closed RWops"); openedRWops --; #endif +#ifdef DEBUG_PHYSFS + FakePhysFSClose(rw); +#endif return 0; } /* physfsrwops_close */ @@ -256,10 +260,12 @@ SDL_RWops *PHYSFSRWOPS_openAppend(const char *const fname) return create_rwops(PhysFs::openAppend(fname)); } /* PHYSFSRWOPS_openAppend */ +#ifdef DUMP_LEAKED_RESOURCES void reportRWops() { if (openedRWops) logger->log("leaking RWops: %d", openedRWops); } +#endif /* end of physfsrwops.c ... */ |