Skip to content

Commit

Permalink
perf: release memory of temporary fields (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Aug 14, 2023
1 parent 75e6b1a commit 43ae3a9
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 43ae3a9

Please sign in to comment.