Hi all,
I'm new to Tesseract-OCR. I tried to use it in my application and compiled
with VS2008. The application always dump memory object during debug mode.
I had did some testing and the results as below.
1. No memory leak if compile using APIExample VS2008 project.
Then, I followed the developer notes of "Programming with libtesseract" and
create a new project as MyDll in VS2008 (in Unicode character set).
2. No memory leak if add tesseract's headers only and compile with MyDll
VS2008 project.
3. No memory leak if add tesseract's headers + link to tesseract's
debug_dll linking files and compile with MyDll VS2008 project.
4. Memory leak after adding "tesseract::TessBaseAPI *api;" in my class
header. (No "new" in the implementation yet)
5. Memory leak after adding implementation into "class foo".
class foo{
private:
tesseract::TessBaseAPI* api;
public:
foo():api(0) {};
~foo() {};
void initinstance();
void exitinstance();
};
void foo::init()
{
if(api == 0) api = new tesseract::TessBaseAPI();
}
void foo::exitinstance()
{
if( api ){
api->Clear();
api->End();
delete api;
api = 0;
}
}
--
--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en
---
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.