874
edits
(fixed snippet to match current development) |
(→memory: renamed memory.getLiveObjects() to memory.get(), as per myk's suggestion) |
||
| Line 103: | Line 103: | ||
Marks ''object'' for being tracked, and categorizes it with the given name. If ''name'' isn't specified, the memory tracker attempts to infer the name by first checking the object's <tt>constructor.name</tt>; if that fails or results in the generic <tt>Object</tt>, the stack is inspected and the name of the current function being executed—which is assumed to be a constructor function—is used. | Marks ''object'' for being tracked, and categorizes it with the given name. If ''name'' isn't specified, the memory tracker attempts to infer the name by first checking the object's <tt>constructor.name</tt>; if that fails or results in the generic <tt>Object</tt>, the stack is inspected and the name of the current function being executed—which is assumed to be a constructor function—is used. | ||
<tt>memory.''' | <tt>memory.'''get'''([''name''])</tt> | ||
Returns an <tt>Array</tt> of all live tracked objects that have been categorized with the given name. If ''name'' isn't provided, all live tracked objects are returned. | Returns an <tt>Array</tt> of all live tracked objects that have been categorized with the given name. If ''name'' isn't provided, all live tracked objects are returned. | ||
edits