runningcode / gradle-doctor

The right prescription for your Gradle build.
http://runningcode.github.io/gradle-doctor
Apache License 2.0
736 stars 48 forks source link

Potential memory leak #247

Closed lwasyl closed 1 year ago

lwasyl commented 1 year ago

I'm not sure if it's actually a leak, just when investigating unrelated issue I noticed that the plugin keeps a lot of stuff on the heap:

image

That's heapdump after Gradle crashed with OOM, I'm pretty confident gradle-doctor is not the culprit but the amount of memory retained seems a bit suspicious regardless I think

runningcode commented 1 year ago

Thanks for filing. It retains the build operations over the course of a build in order to do the tallying and math. These should be dropped after a build completes. Are you seeing that these are retained over the course of several builds?

lwasyl commented 1 year ago

Yep, I filed it just in case because I saw something out of the ordinary, but that was heap dumped on OOM, so there wasn't an opportunity to clean up stuff I guess.

I checked now and after a build and GC I don't see many references in plugin's classes 👍 So seems all is good