baopham1340 / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

Patch for /training/cntraining.cpp #1488

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by oriahulr...@microvu.com on 15 Jun 2015 at 10:06

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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?

Original comment by oriahulr...@microvu.com on 16 Jun 2015 at 1:23

GoogleCodeExporter commented 8 years ago
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

Original comment by zde...@gmail.com on 16 Jun 2015 at 8:13

GoogleCodeExporter commented 8 years ago
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/d9376594a86ff45dad2d3a3b7284e0
c1f7ce711c

Original comment by zde...@gmail.com on 30 Jul 2015 at 7:28