diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2012-02-22 20:52:56 +0100 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2012-02-22 20:53:17 +0100 |
commit | 92291e72b165084f7d09099cef57b6bc559b0d39 (patch) | |
tree | 4e7f86f08990fce0d43926044e90ce677bf23aaf | |
parent | 9f96227ed9dd25cbcb754fc8cbb1013d4e48badf (diff) | |
download | scala-92291e72b165084f7d09099cef57b6bc559b0d39.tar.gz scala-92291e72b165084f7d09099cef57b6bc559b0d39.tar.bz2 scala-92291e72b165084f7d09099cef57b6bc559b0d39.zip |
Don't populate the concreteSpecMethod set in presentation compiler runs. This is safe because the presentation
compiler never runs the tree transformer (where this map is needed). This is a source of serious memory leaks in the IDE, but it wasn't visible before because the IDE didn't run the info transformers far enough. Interestingly, this is not a leak in batch runs: each element of the set is removed when the tree is transformed.
For a nice graph of the effect of this change, see: http://i41.tinypic.com/xe0k7o.jpg
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 8f02194486..bb0388e9f8 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -1719,7 +1719,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { * that here are not garbage collected at the end of a compiler run! */ def addConcreteSpecMethod(m: Symbol) { - if (currentRun.compiles(m)) concreteSpecMethods += m + if (!forInteractive && currentRun.compiles(m)) concreteSpecMethods += m } private def makeArguments(fun: Symbol, vparams: List[Symbol]): List[Tree] = ( |