You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The the wiki page APIExample, for the python example, the handle api is is run through the TessBaseAPIDelete funciton if the api failed to be initialized whereas for the C example below, this is not the case.
python:
rc=tesseract.TessBaseAPIInit3(api, TESSDATA_PREFIX, lang)
if (rc):
tesseract.TessBaseAPIDelete(api)
print("Could not initialize tesseract.\n")
exit(3)
Either the python example doesn't destroy the api handle or the api handle is destroyed in the c example.
Suggested Fix:
Chose one the behaviour. I do not know tesseract enough to be able to tell which one to choose though I feel like the correct one would be to add TessBaseAPIDelete to the C example as it seems to be an omission. Also I was unable to find the documentation of the function TessBaseAPIDelete so I cannot give more information.
The text was updated successfully, but these errors were encountered:
NilsIrl
changed the title
Inconsistency in APIExample
Inconsistency in APIExample wiki page
Dec 25, 2019
Current Behavior:
The the wiki page APIExample, for the python example, the handle api is is run through the
TessBaseAPIDelete
funciton if the api failed to be initialized whereas for the C example below, this is not the case.python:
Expected Behavior:
Either the python example doesn't destroy the api handle or the api handle is destroyed in the c example.
Suggested Fix:
Chose one the behaviour. I do not know tesseract enough to be able to tell which one to choose though I feel like the correct one would be to add
TessBaseAPIDelete
to the C example as it seems to be an omission. Also I was unable to find the documentation of the functionTessBaseAPIDelete
so I cannot give more information.The text was updated successfully, but these errors were encountered: