diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-29 22:11:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-29 22:11:59 +0300 |
commit | fc31f1003bec7e0117421a8c58668e61849eeba5 (patch) | |
tree | 9cac96fdc7235a8ba51bc55460be71a6c368386f /src | |
parent | 05eecd6ecb0b094584ff6c9cf3c95642cf373a8b (diff) | |
download | manaplus-fc31f1003bec7e0117421a8c58668e61849eeba5.tar.gz manaplus-fc31f1003bec7e0117421a8c58668e61849eeba5.tar.bz2 manaplus-fc31f1003bec7e0117421a8c58668e61849eeba5.tar.xz manaplus-fc31f1003bec7e0117421a8c58668e61849eeba5.zip |
Remove leaking resources detection from virtfsrwops.
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/virtfs/virtfsrwops.cpp | 24 | ||||
-rw-r--r-- | src/fs/virtfs/virtfsrwops.h | 3 | ||||
-rw-r--r-- | src/maingui.cpp | 4 |
3 files changed, 0 insertions, 31 deletions
diff --git a/src/fs/virtfs/virtfsrwops.cpp b/src/fs/virtfs/virtfsrwops.cpp index 546c18e05..f44cc6601 100644 --- a/src/fs/virtfs/virtfsrwops.cpp +++ b/src/fs/virtfs/virtfsrwops.cpp @@ -60,10 +60,6 @@ #define RWOPSSIZE int #endif // USE_SDL2 -#ifdef DUMP_LEAKED_RESOURCES -static int openedRWops = 0; -#endif // DUMP_LEAKED_RESOURCES - static RWOPSINT virtfsrwops_seek(SDL_RWops *const rw, const RWOPSINT offset, const int whence) @@ -198,12 +194,6 @@ static int virtfsrwops_close(SDL_RWops *const rw) } /* if */ SDL_FreeRW(rw); -#ifdef DUMP_LEAKED_RESOURCES - if (openedRWops <= 0) - logger->assertLog("virtfsrwops_seek: closing already closed RWops"); - openedRWops --; -#endif // DUMP_LEAKED_RESOURCES - return 0; } /* virtfsrwops_close */ @@ -239,9 +229,6 @@ static SDL_RWops *create_rwops(VirtFile *const file) retval->close = &virtfsrwops_close; retval->hidden.unknown.data1 = file; } /* if */ -#ifdef DUMP_LEAKED_RESOURCES - openedRWops ++; -#endif // DUMP_LEAKED_RESOURCES } /* else */ return retval; @@ -317,15 +304,4 @@ SDL_RWops *VirtFs::RWopsOpenAppend(const std::string &restrict fname) return create_rwops(VirtFs::openAppend(fname)); } /* RWopsopenAppend */ -#ifdef DUMP_LEAKED_RESOURCES -void VirtFs::reportRWops() -{ - if (openedRWops) - { - logger->assertLog("virtfsrwops_seek: leaking RWops: %d", - openedRWops); - } -} -#endif // DUMP_LEAKED_RESOURCES - /* end of virtfsrwops.c ... */ diff --git a/src/fs/virtfs/virtfsrwops.h b/src/fs/virtfs/virtfsrwops.h index 107cc4265..56fda969d 100644 --- a/src/fs/virtfs/virtfsrwops.h +++ b/src/fs/virtfs/virtfsrwops.h @@ -59,9 +59,6 @@ namespace VirtFs SDL_RWops *RWopsOpenAppend(const std::string &restrict fname) A_WARN_UNUSED; SDL_RWops *MakeRWops(VirtFile *const handle) A_WARN_UNUSED; -#ifdef DUMP_LEAKED_RESOURCES - void reportRWops(); -#endif // DUMP_LEAKED_RESOURCES } // namespace VirtFs #endif // SRC_FS_VIRTFSRWOPS_H diff --git a/src/maingui.cpp b/src/maingui.cpp index 18e743557..668f044e9 100644 --- a/src/maingui.cpp +++ b/src/maingui.cpp @@ -134,10 +134,6 @@ int mainGui(int argc, char *argv[]) IMG_Quit(); #endif // SDL_IMAGE_VERSION_ATLEAST(1, 2, 11) -#ifdef DUMP_LEAKED_RESOURCES - VirtFs::reportRWops(); -#endif // DUMP_LEAKED_RESOURCES - return ret; } #else // UNITTESTS |