View statistics to locate memory leaks
Use the Memory Statistics tool with the Objects tool to find memory leaks. Begin by using the Memory Statistics tool to retrieve information on your application's memory usage. The Memory Statistics tool identifies the number of objects in memory, while the Objects tool displays detailed information for each object.
The Memory Statistics tool displays the statistics on the number of objects and bytes in use for object handles, RAM, and flash memory.
Find memory leaks
The Memory Statistics pane has the following columns and rows.
Find a memory leak
- Set two or more breakpoints in your code.
- Open the BlackBerry® IDE.
- On the Debug menu, click Go. The application runs to the first breakpoint.
- In the main window, on the View menu, click Memory Statistics.
- In the memory statistics pane, click Refresh.
- Click Snapshot.
- On the Debug menu, click Continue. The application runs to the second breakpoint.
- In the memory statistics pane, click the Refresh tab.
- Click Compare to Snapshot.
- Repeat steps 1 through 8, setting breakpoints closer together until they converge on the memory leak.
Save the contents of the pane to a .csv file
Contents are saved as they are displayed.
Related topic