Example 7

Example 7: Eval is evil (almost always)

Analyze the impact of closures on memory. See Analyze the impact of closures on memory in Record heap snapshots using the Memory tool ("Heap snapshot" profiling type).

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)