Will add this comment:
  // Should we garbage-collect?  Here we do:
  // The idea is this: we will only need to look up records by debugId
  // in the future when there is a future event pending.  If all the
  // expected "resolves" have occurred and all the expected "appears"
  // have matching "resolves", and there has been an "exit" (matching
  // the initial "enter", then there should be no further events for
  // this debugId.




On Mon, Mar 3, 2014 at 4:24 PM, jamessynge <notifications@github.com> wrote:

> In site/top/src/editor-debug.js:
>
> > +      if (!oldRecord || !oldRecord.traced) {
> > +        traceLine(record.line);
> > +      }
> > +      record.traced = true;
> > +    } else {
> > +      if (!oldRecord || !oldRecord.appearCount || oldRecord === record) {
> > +        lineRecord[record.line] = record;
> > +        if (oldRecord && oldRecord.traced) {
> > +          untraceLine(record.line);
> > +        }
> > +      }
> > +      record.traced = false;
> > +    }
> > +  }
> > +  // Should we garbage-collect?  Here we do:
> > +  if (record.resolveCount >= record.totalCount &&
>
> Please explain the garbage collection in more detail, here or above (if
> already done, I missed it during this review).
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/PencilCode/pencilcode-site/pull/35/files#r10229648>
> .
>