Help Center

Local Navigation

Display objects that are stored in memory to locate memory allocation problems

  1. Specify two or more breakpoints in your code.
  2. On the Run menu, click Debug As > BlackBerry Simulator. The application runs to the first breakpoint.
  3. In the Debug view, click Suspend.
  4. On the Window menu, click Show View > Other.
  5. Expand the BlackBerry folder.
  6. Click BlackBerry Objects View.
  7. Click OK.
  8. In the BlackBerry Objects View, click Set up filters.
  9. In the Objects View Options dialog box, in the Snapshot Filter drop-down list, click Compare to Snapshot.
  10. Click OK.
  11. In the BlackBerry Objects View, click Perform garbage collection.
  12. Click Snapshot.
  13. Press F8 to resume running the application.
  14. Perform operations in the application that do not increase the number of reachable objects. For example, create a new contact and then delete it.
  15. In the Debug view, click Suspend.
  16. In the BlackBerry Objects View, click Perform garbage collection. The BlackBerry Objects View displays the number of objects that have been deleted and added since the previous snapshot. If the number of objects added is not the same as the number of objects deleted, you might have a memory allocation problem.
  17. To identify new objects, use the Type, Process, and Location filter types in the Objects View Options dialog box.
  18. To save the contents of the BlackBerry Objects View to a comma-separated values (.csv) file, click Save.

Was this information helpful? Send us your comments.