Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid unnecessary new / delete code #857

Merged
merged 4 commits into from
May 1, 2017
Merged

Conversation

stweil
Copy link
Member

@stweil stweil commented Apr 30, 2017

No description provided.

stweil added 4 commits April 30, 2017 19:23
It's also not necessary to nullify class variables in the destructor.

Signed-off-by: Stefan Weil <[email protected]>
Both class variables BaselineCutoffs and CharNormCutoffs were pointers
to fixed size arrays which were allocated in the constructor and
deallocated in the destructor. These two extra allocations and two
extra deallocations can be avoided.

Signed-off-by: Stefan Weil <[email protected]>
The class variable mutex_send_ does not require an indirection
by using a pointer.

Signed-off-by: Stefan Weil <[email protected]>
@stweil
Copy link
Member Author

stweil commented Apr 30, 2017

This is similar to pull request #352 and avoids additional new / delete operations. There remain some more cases, but those are more difficult, so they will be handled in a later pull request.

@zdenop zdenop merged commit 6e80812 into tesseract-ocr:master May 1, 2017
@stweil stweil deleted the new_delete branch May 1, 2017 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants