diff options
-rw-r--r-- | src/dotty/tools/dotc/reporting/StoreReporter.scala | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/reporting/StoreReporter.scala b/src/dotty/tools/dotc/reporting/StoreReporter.scala index bde034845..586273c2e 100644 --- a/src/dotty/tools/dotc/reporting/StoreReporter.scala +++ b/src/dotty/tools/dotc/reporting/StoreReporter.scala @@ -8,9 +8,16 @@ import config.Printers.typr import diagnostic.MessageContainer import diagnostic.messages._ -/** - * This class implements a Reporter that stores all messages - */ +/** This class implements a Reporter that stores all messages + * + * Beware that this reporter can leak memory, and force messages in two + * scenarios: + * + * - During debugging `config.Printers.typr` is set from `noPrinter` to `new + * Printer`, which forces the message + * - The reporter is not flushed and the message containers capture a + * `Context` (about 4MB) + */ class StoreReporter(outer: Reporter) extends Reporter { private var infos: mutable.ListBuffer[MessageContainer] = null |