Skip to content

Commit

Permalink
Issue #529: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rfschtkt committed May 13, 2017
1 parent 6bebe71 commit 9a5ed19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dict/dict.cpp
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9a5ed19

Please sign in to comment.