Skip to content

Commit 42b3177

Browse files
Create heapSnapshot.md
1 parent 7a3d74f commit 42b3177

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/unsupported/heapSnapshot.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## heapSnapshot
2+
<img width="1536" height="1024" alt="Copilot_20260420_200326" src="https://github.com/user-attachments/assets/efd7bce5-4181-46c5-809a-329a1a16ae1b" />
3+
Record a heap snapshot to debug memory leaks.
4+
The heap snap snapshot is is a complete serialized representation of the runtime’s heap at a specific moment in execution.
5+
6+
## Example
7+
Get objects in the heap every 2 seconds.
8+
``` ts
9+
game.onUpdateInterval(2000, () => {
10+
control.heapSnapshot()
11+
})
12+
```

0 commit comments

Comments
 (0)