diff options
| author | Antonin Descampe <antonin@gmail.com> | 2004-08-06 14:13:51 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2004-08-06 14:13:51 +0000 |
| commit | bc5c5115cbd4b5d6500348f7af2fa49e02b216ce (patch) | |
| tree | 66c869d78bf9a64845e59a3df7a36330595c7e26 /codec/image_to_j2k.c | |
| parent | 61ac18531a62bcc31552875d2d9c5458bac452e2 (diff) | |
* Inserted tool for memory leaks fixing in debug mode
* Fixed some memory leaks in the decoder (some are still present when multiple tiles!)
Diffstat (limited to 'codec/image_to_j2k.c')
| -rw-r--r-- | codec/image_to_j2k.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index 54bd0c92..e7047026 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -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; } |
