Issue 1488 in tesseract-ocr: Patch for /training/cntraining.cpp

4 views
Skip to first unread message

tesser...@googlecode.com

unread,
Jun 15, 2015, 6:06:12 PM6/15/15
to tesserac...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Patch

New issue 1488 by oriahulr...@microvu.com: Patch for
/training/cntraining.cpp
https://code.google.com/p/tesseract-ocr/issues/detail?id=1488

Free the Clusterer after each usage, since a new Clusterer is created at
the beginning of the iterate loop in SetUpForClustering.

This was causing SOME memory leaks, still looking into a few more in
cntraining.

Attachments:
cntraining.cpp.patch 360 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

tesser...@googlecode.com

unread,
Jun 15, 2015, 7:23:31 PM6/15/15
to tesserac...@googlegroups.com

Comment #1 on issue 1488 by oriahulr...@microvu.com: Patch for
/training/cntraining.cpp
https://code.google.com/p/tesseract-ocr/issues/detail?id=1488

Same thing applies to ProtoList as well. New lists are created but only the
last one is ever actually deleted. Note: NormProtoList has pointers to the
ProtoList elements ( the elements are shared ), so maybe when NormProtoList
is freed, the ProtoType nodes need to be deleted with FreePrototype.

tesser...@googlecode.com

unread,
Jun 15, 2015, 9:23:43 PM6/15/15
to tesserac...@googlegroups.com

Comment #2 on issue 1488 by oriahulr...@microvu.com: Patch for
/training/cntraining.cpp
https://code.google.com/p/tesseract-ocr/issues/detail?id=1488

There is a memory leak with the cells in the lists in NormProtoList.. the
only thing FreeNormProtoList is doing is going through each list and
destroying said list (through free_cell) and freeing Label and then the
LabeledList container ultimately.. But it is NOT destroying the nodes in
each cell of the LabeledList's member list. See FreeProtoList for how it
should be done for each list in NormProtoList. Is this incorrect? Should I
spend the time to perform this correction?

tesser...@googlecode.com

unread,
Jun 16, 2015, 4:13:44 AM6/16/15
to tesserac...@googlegroups.com

Comment #3 on issue 1488 by zde...@gmail.com: Patch for
/training/cntraining.cpp
https://code.google.com/p/tesseract-ocr/issues/detail?id=1488

please make a pull request on https://github.com/tesseract-ocr/tesseract
See info[1] on tesseract-dev forum.
[1] https://groups.google.com/forum/#!topic/tesseract-dev/_LiqkPTduFg

tesser...@googlecode.com

unread,
Jul 30, 2015, 3:28:35 AM7/30/15
to tesserac...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 1488 by zde...@gmail.com: Patch for
/training/cntraining.cpp
https://code.google.com/p/tesseract-ocr/issues/detail?id=1488

I made a change different way[1]. If you want to work on NormProtoList,
please use github.com

[1]
https://github.com/tesseract-ocr/tesseract/commit/d9376594a86ff45dad2d3a3b7284e0c1f7ce711c
Reply all
Reply to author
Forward
0 new messages