Example 7

Example 7: Eval is evil (almost always)

Let's analyze the impact of closures on memory

You can see that 'eval' retains a reference on all the variables of the closure.

  1. Start the creation of new closures
  2. Take a heap snapshot
  3. Find the closures (named lC, sC and eC)