CmdID

CmdID / Commands

leaks

Search a process's memory for unreferenced malloc buffers. tldr-pages

On macOS

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examine a running process for leaks by its name

leaks process_nameIdentify

Examine a running process for leaks by its PID

leaks process_idIdentify

Launch a command and check for leaks when it exits

leaks -atExit -- commandIdentify

Enable backtraces for each leak by setting the MallocStackLogging environment variable

MallocStackLogging=YES leaks process_nameIdentify

Display results in the classic list format instead of a tree

leaks -list process_nameIdentify

Group leaked objects by type

leaks -groupByType process_nameIdentify

Save the memory state to a memory graph file for later analysis

leaks process_name -outputGraph path/to/file.memgraphIdentify

Examine a previously saved memory graph file

leaks path/to/file.memgraphIdentify