While the heap is being enumerated, the current context cannot be removed, and all calls to modify the state of the context will fail until the heap enumerator is released.
Requires an active script context.
public static Native.IActiveScriptProfilerHeapEnum EnumerateHeap() { Native.IActiveScriptProfilerHeapEnum enumerator; Native.ThrowIfError(Native.JsEnumerateHeap(out enumerator)); return enumerator; }