提交 ba95a686 编写于 作者: S Stefan Weil

Use lept_free to free memory allocated by Leptonica

This fixes problems on Windows when Tesseract and Leptonica use different
C runtime libraries.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
上级 f4f66f8f
......@@ -331,7 +331,7 @@ void ImageData::SetPixInternal(Pix* pix, GenericVector<char>* image_data) {
pixDestroy(&pix);
image_data->resize_no_init(size);
memcpy(&(*image_data)[0], data, size);
free(data);
lept_free(data);
}
// Returns the Pix image for the image_data. Must be pixDestroyed after use.
......
......@@ -809,7 +809,7 @@ void ScrollView::Image(struct Pix* image, int x_pos, int y_pos) {
base64[code_len++] = kBase64Table[remainder & 63];
SendRawMessage(base64);
delete [] base64;
free(data);
lept_free(data);
}
// Escapes the ' character with a \, so it can be processed by LUA.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册