mirror of https://github.com/sbt/sbt.git
It was possible to make new classloaders for the scala library and other jars with each new scala instance. To avoid this, I audited all of the places within sbt where we make a ScalaInstance and ensure that we instantiate them in such a way that the classloaders are retrieved through the state's ClassLoaderCache. After this change, I found from a heap dump that it was possible to run test in a project that uses scala 2.12.8 and have only ONE classloader for the scala library present in the heap dump. With older versions, there were would be up to 3 or 4 in most heap dumps. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||