diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/DocComments.scala')
-rwxr-xr-x | src/compiler/scala/tools/nsc/ast/DocComments.scala | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/DocComments.scala b/src/compiler/scala/tools/nsc/ast/DocComments.scala index f2e5c9b1eb..7cf2f8559b 100755 --- a/src/compiler/scala/tools/nsc/ast/DocComments.scala +++ b/src/compiler/scala/tools/nsc/ast/DocComments.scala @@ -18,8 +18,14 @@ trait DocComments { self: Global => val cookedDocComments = mutable.HashMap[Symbol, String]() - /** The raw doc comment map */ - val docComments = mutable.HashMap[Symbol, DocComment]() + /** The raw doc comment map + * + * In IDE, background compilation runs get interrupted by + * reloading new sourcefiles. This is weak to avoid + * memleaks due to the doc of their cached symbols + * (e.g. in baseTypeSeq) between periodic doc reloads. + */ + val docComments = mutable.WeakHashMap[Symbol, DocComment]() def clearDocComments() { cookedDocComments.clear() |