Skip to content

Commit

Permalink
Also call gc.collect after a complete request
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuukk authored Aug 27, 2024
1 parent 9fcbdba commit 05e9487
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dcd/server/autocomplete/complete.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ enum CalltipHint {
public AutocompleteResponse complete(const AutocompleteRequest request,
ref ModuleCache moduleCache)
{
import core.memory: GC;
scope(exit) GC.collect();

const(Token)[] tokenArray;
auto stringCache = StringCache(request.sourceCode.length.optimalBucketCount);
auto beforeTokens = getTokensBeforeCursor(request.sourceCode,
Expand Down

0 comments on commit 05e9487

Please sign in to comment.