whether or not the object is reachable from the root set (global scope). • Free memory for each object that cannot be reached • “reachable” can be decided in many ways Wednesday, June 27, 2012
each object in the heap • When the reference count reaches 0 the object is freed • Objective-C uses a similar scheme for more structured memory management Wednesday, June 27, 2012
Perform a tree-traversal of the root set marking objects that are “in use” or “reachable” • Then sweep the heap removing any objects not marked as “in use” Wednesday, June 27, 2012
Behavior depends on execution context and method of assignment • Can’t delete built-ins, arguments, etc. See: http://perfectionkills.com/understanding-delete/ Wednesday, June 27, 2012
tools • There are various 3rd party applications to help with older browsers • Bloat prevention can be impractical for large projects Chrome Walkthrough: http://gent.ilcore.com/2011/08/finding-memory-leaks.html Wednesday, June 27, 2012