From 9e893aa103a07a1ce9c93dd16ea6c2d599d5e6de Mon Sep 17 00:00:00 2001 From: Ben Lee Date: Mon, 11 Dec 2023 13:45:26 -0800 Subject: [PATCH] Clear KSObjectCacheManager during resolver tear down (cherry picked from commit f4ca61a0e1264045381251b6a1c97209ff291fa0) --- .../com/google/devtools/ksp/processing/impl/ResolverImpl.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processing/impl/ResolverImpl.kt b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processing/impl/ResolverImpl.kt index f07b68e633..5abd17cc02 100644 --- a/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processing/impl/ResolverImpl.kt +++ b/compiler-plugin/src/main/kotlin/com/google/devtools/ksp/processing/impl/ResolverImpl.kt @@ -202,6 +202,7 @@ class ResolverImpl( // Mitigation for processors with memory leaks // https://github.com/google/ksp/issues/1063 fun tearDown() { + KSObjectCacheManager.clear() instance = null }