Troubleshooting guide

6
Managing memory
Invoking a garbage collection operation
See the Garbage Collection in the BlackBerry Java Development Environment white paper and the BlackBerry
Java Development Environment Fundamentals Guide
for more information about garbage collection operations.
Reduce the number of objects
To use the BlackBerry® Integrated Development Environment to identify unnecessary objects, complete the
following steps:
1. Open the BlackBerry IDE.
2. Place two breakpoints in the code surrounding an area of high object creation.
3. Run the application to the first breakpoint.
4. Open the Objects window and click Snapshot.
5. Run the application to the second breakpoint.
6. Open the Objects window.
7. Click Compare to Snapshot.
8. View multiple snapshots in the Objects window.
9. Determine which objects can be removed.
Managing low memory
LMM triggers
The following conditions can cause the LMM to free memory resources:
Invoking a garbage collection operation
Reduce the number of objects
Managing low memory
Condition Description
Available flash memory falls below
acceptable thresholds.
The free flash memory threshold depends on the amount of free RAM in the system. The free flash
memory threshold varies between 400 KB and 800 KB.