mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-11 23:19:04 +08:00
Issue #529: cleanup
This commit is contained in:
parent
fd1098db3d
commit
90db5a17f0
@ -241,11 +241,12 @@ void Dict::Load(const char *data_file_name, const STRING &lang) {
|
||||
if (load_bigram_dawg) {
|
||||
bigram_dawg_ = dawg_cache_->GetSquishedDawg(
|
||||
lang, data_file_name, TESSDATA_BIGRAM_DAWG, dawg_debug_level);
|
||||
if (bigram_dawg_) dawgs_ += bigram_dawg_;
|
||||
}
|
||||
if (load_freq_dawg) {
|
||||
freq_dawg_ = dawg_cache_->GetSquishedDawg(
|
||||
lang, data_file_name, TESSDATA_FREQ_DAWG, dawg_debug_level);
|
||||
if (freq_dawg_) { dawgs_ += freq_dawg_; }
|
||||
if (freq_dawg_) dawgs_ += freq_dawg_;
|
||||
}
|
||||
if (load_unambig_dawg) {
|
||||
unambig_dawg_ = dawg_cache_->GetSquishedDawg(
|
||||
@ -331,7 +332,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