* Inserted tool for memory leaks fixing in debug mode

* Fixed some memory leaks in the decoder (some are still present when multiple tiles!)
This commit is contained in:
Antonin Descampe
2004-08-06 14:13:51 +00:00
parent 61ac18531a
commit bc5c5115cb
6 changed files with 89 additions and 4 deletions

View File

@@ -26,6 +26,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
//MEMORY LEAK
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h> // Must be included first
#include <crtdbg.h>
#endif
//MEM
#include <openjpeg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -895,5 +903,12 @@ int main(int argc, char **argv)
free(cp.tcps[tileno].tccps);
free(cp.tcps);
//MEMORY LEAK
#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif
//MEM
return 0;
}