kcobra / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

Serious memory leak in libtesseract302 #1383

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Make a MFC window project linked to libtesseract302(dll and lib are same).
2.Need not call any tesseract functions.
3.Compile a debug version and run the program in MS visual studio, close the 
window.
The memory leak dump will last for several minutes!

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.

My piece of code for link with tesseract302.

#include <tesseract/baseapi.h>

#define Use_Tesseract_Static_Lib    0
#if Use_Tesseract_Static_Lib
#   pragma comment(lib, "wsock32.lib")
#ifdef _DEBUG
#       pragma comment(lib, "libtesseract302-static-debug.lib")
#       pragma comment(lib, "liblept168-static-mtdll-debug.lib")
#       pragma comment(lib, "giflib416-static-mtdll-debug.lib")
#       pragma comment(lib, "libjpeg8c-static-mtdll-debug.lib")
#       pragma comment(lib, "libpng143-static-mtdll-debug.lib")
#       pragma comment(lib, "libtiff394-static-mtdll-debug.lib")
#       pragma comment(lib, "zlib125-static-mtdll-debug.lib")
#   else
#       pragma comment(lib, "libtesseract302-static.lib")
#       pragma comment(lib, "liblept168-static-mtdll.lib")
#       pragma comment(lib, "giflib416-static-mtdll.lib")
#       pragma comment(lib, "libjpeg8c-static-mtdll.lib")
#       pragma comment(lib, "libpng143-static-mtdll.lib")
#       pragma comment(lib, "libtiff394-static-mtdll.lib")
#       pragma comment(lib, "zlib125-static-mtdll.lib")
#   endif
#else
#   ifdef _DEBUG
#       pragma comment(lib, "libtesseract302d.lib")
#   else
#       pragma comment(lib, "libtesseract302.lib")
#   endif
#endif

Original issue reported on code.google.com by zhk.ti...@gmail.com on 17 Nov 2014 at 4:25

GoogleCodeExporter commented 9 years ago

Original comment by zde...@gmail.com on 12 Apr 2015 at 3:33