Closed fanmingyi closed 3 years ago
thx, do you have more insights? checked dagger's PR but I'm not super familiar around there.. 🤔 @fanmingyi
From what I can gather by looking at the referenced issues, it seems like there is a memory leak within kapt when certain static caches or utilities are being used. In our case, the culprit seems to be this guy.
ELEMENT_UTILS
is only used by a singular helper function. Maybe it's possible to rid ourselves of that static reference, which should in turn allow for proper GC. FWIW, we also have a static TYPE_UTILS
, but I cannot see if that contributes to the leak as well.
this issue is solved by update the gradle to 4.0.0 and the kotlin version
classpath 'com.android.tools.build:gradle:4.0.0'
ref: https://github.com/permissions-dispatcher/PermissionsDispatcher/pull/743 let me close the issue.
https://github.com/gradle/gradle/issues/12571
Similar problems:https://github.com/google/dagger/issues/1645