mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
Issue #529: cleanup
This commit is contained in:
parent
6bebe71749
commit
9a5ed19cf6
@ -241,11 +241,12 @@ void Dict::Load(const STRING &lang, TessdataManager *data_file) {
|
||||
if (load_bigram_dawg) {
|
||||
bigram_dawg_ = dawg_cache_->GetSquishedDawg(lang, TESSDATA_BIGRAM_DAWG,
|
||||
dawg_debug_level, data_file);
|
||||
if (bigram_dawg_) dawgs_ += bigram_dawg_;
|
||||
}
|
||||
if (load_freq_dawg) {
|
||||
freq_dawg_ = dawg_cache_->GetSquishedDawg(lang, TESSDATA_FREQ_DAWG,
|
||||
dawg_debug_level, data_file);
|
||||
if (freq_dawg_) { dawgs_ += freq_dawg_; }
|
||||
if (freq_dawg_) dawgs_ += freq_dawg_;
|
||||
}
|
||||
if (load_unambig_dawg) {
|
||||
unambig_dawg_ = dawg_cache_->GetSquishedDawg(lang, TESSDATA_UNAMBIG_DAWG,
|
||||
@ -351,7 +352,6 @@ void Dict::End() {
|
||||
delete dawgs_[i];
|
||||
}
|
||||
}
|
||||
dawg_cache_->FreeDawg(bigram_dawg_);
|
||||
if (dawg_cache_is_ours_) {
|
||||
delete dawg_cache_;
|
||||
dawg_cache_ = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user