Programming Interfaces Guide

check -leaks [-frames n] [-match m]

The -leaks option turns on leak checking. RTC reports the following errors:


Possible memory leak – The only pointer points in the middle of the block


Possible memory leak – The pointer to the block exists only in register


Memory leak – No pointers to the block

With leak checking turned on, you get an automatic leak report when the program exits. All leaks, including potential leaks, are reported at that time. By default, a non-verbose report is generated. This default is controlled by the dbxenv rtc_mel_at_exit. However, you can ask for a leak report at any time.

The -frames n variable displays up to n distinct stack frames when reporting leaks. The -match m variable combines leaks. If the call stack at the time of allocation for two or more leaks matches m frames, these leaks are reported in a single combined leak report. The default value of n is the larger of 8 or the value of m. The maximum value of n is 16. The default value of m is 2.