I am not sure about C#, but the rules for c++ are described e.h. here: https://en.wikipedia.org/wiki/New_and_delete_(C%2B%2B)
Zdenko št 27. 10. 2022 o 11:17 Björn Gitter <blitzret...@gmail.com> napísal(a): > I'm using Tesseract 4.1.1 and Tesseract.Drawing 4.1.1 in c# > I downloaded the language data from > https://github.com/tesseract-ocr/tessdata_fast > > The app works and extracts the correct data but I get the following error > messages: > ObjectCache(00007FF81981DEC8)::~ObjectCache(): WARNING! LEAK! object > 000001D5B1B72440 still has count 1 (id > f:\tessdata/eng.traineddatalstm-punc-dawg) > ObjectCache(00007FF81981DEC8)::~ObjectCache(): WARNING! LEAK! object > 000001D5B1B71AE0 still has count 1 (id > f:\tessdata/eng.traineddatalstm-word-dawg) > ObjectCache(00007FF81981DEC8)::~ObjectCache(): WARNING! LEAK! object > 000001D5B1B716C0 still has count 1 (id > f:\tessdata/eng.traineddatalstm-number-dawg) > > Any suggestions on how to not get the leak? > > TesseractEngine engine = new TesseractEngine("f:\\tessdata", "eng", > EngineMode.LstmOnly); > engine.SetVariable("tessedit_char_whitelist", "0123456789:/"); > > Bitmap tmpbitmap = capturearea(119, 1651, 200, 35); > Pix bmpinpix = PixConverter.ToPix(tmpbitmap); > > using (var page = engine.Process(bmpinpix, PageSegMode.Auto)) > { > var text = page.GetText(); > Console.WriteLine(text); > } > > > -- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to tesseract-ocr+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tesseract-ocr/cd582594-a287-4f15-af67-6be9dd8f26bfn%40googlegroups.com > <https://groups.google.com/d/msgid/tesseract-ocr/cd582594-a287-4f15-af67-6be9dd8f26bfn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/CAJbzG8y5OEMN8frgNx%3D7XY6ZZTxZ%3DuGv9%3DB4_f35_mZWwSU3Dg%40mail.gmail.com.