Analyze the impact of closures on memory. See Demo webpage: Example 8: Recording heap allocations 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.