summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2012-02-24 19:53:10 +0100
committerIulian Dragos <jaguarul@gmail.com>2012-02-24 20:02:50 +0100
commit0c2f493804db6b594d7ec68e49e76c75a316230b (patch)
tree92a318c5c649e0e68fca1f102e77d442710228b6 /src
parente7b362ff91904c22ccf6cebdc9816fbd7d129d7d (diff)
downloadscala-0c2f493804db6b594d7ec68e49e76c75a316230b.tar.gz
scala-0c2f493804db6b594d7ec68e49e76c75a316230b.tar.bz2
scala-0c2f493804db6b594d7ec68e49e76c75a316230b.zip
Better fix for memory leaks in the presentation compiler. Switched to perRunCaches and call clearAll from the presentation compiler
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala1
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index 477cec8c8e..0f28407f5a 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -1052,6 +1052,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
def newTyperRun() {
currentTyperRun = new TyperRun
+ perRunCaches.clearAll()
}
class TyperResult(val tree: Tree) extends ControlThrowable
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index 9f40c10db9..d76154ad1c 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -1709,7 +1709,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 (!forInteractive && currentRun.compiles(m)) concreteSpecMethods += m
+ if (currentRun.compiles(m)) concreteSpecMethods += m
}
private def makeArguments(fun: Symbol, vparams: List[Symbol]): List[Tree] = (