From 11f3d2776bb2a28ce743af2effe32bd43b0f83ed Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 5 Apr 2023 00:27:53 +0200 Subject: [PATCH] Fix memory leak --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 4f491c3d..203c7ccd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -324,6 +324,10 @@ impl Backend { ); } join_all(notifications).await; + + // garbage collect incremental cache. this evicts all memoized results + // that haven't been used in the last 30 compilations. + comemo::evict(30); } async fn signature_help(&self, _uri: Url, position: Position) -> Option {