提交 66e686a0 编写于 作者: E Egor Pugin 提交者: GitHub

Merge pull request #1041 from stweil/leptonica

Use lept_free to free memory allocated by Leptonica
......@@ -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.
先完成此消息的编辑!
想要评论请 注册