Skip to content

Commit

Permalink
perf: release memory of temporary fields
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Aug 13, 2023
1 parent 75e6b1a commit f4cc069
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rime/dict/entry_collector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ void EntryCollector::Finish() {
}
}
}
decltype(collection)().swap(collection);
decltype(words)().swap(words);
decltype(total_weight)().swap(total_weight);
LOG(INFO) << "Pass 3: total " << num_entries << " entries collected.";
}

Expand Down

0 comments on commit f4cc069

Please sign in to comment.