Commit 015e00bc authored by lluis's avatar lluis

Fix memory leak bug #4420

parent 17a947d8
......@@ -140,7 +140,10 @@ public:
tess.SetImage((uchar*)image.data, image.size().width, image.size().height, image.channels(), image.step1());
tess.Recognize(0);
output = string(tess.GetUTF8Text());
char *outText;
outText = tess.GetUTF8Text();
output = string(outText);
delete [] outText;
if ( (component_rects != NULL) || (component_texts != NULL) || (component_confidences != NULL) )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment