* 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user