Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.0-M5
    • Component/s: Type Checker
    • Labels:
      None

      Description

      This leak manifests inside the IDE, but it stems from the way LazyAnnotationInfos are created. I have a unit test for the IDE project that can reproduce the issue (anyone typing a few minutes inside `Implicits.scala` would see the same thing).

      In short, its call-by-name parameter becomes a field, and it never releases the closure, which in turn, through the $outer pointer, hangs on to a whole namer, on each typer run (even when the annotation is forced).

      final class LazyAnnotationInfo(lazyInfo: => AnnotationInfo) extends AnnotationInfo {
          private var forced = false
          private lazy val forcedInfo = try {
           .. 
          } finally forced = true
      ..
      

        Activity

        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/issues/922

          People

          • Assignee:
            Iulian Dragos
            Reporter:
            Iulian Dragos
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development