Full garbage collection on a BlackBerry device

The full garbage collection operation executes for 1 second on average and should take less than 2 seconds to complete. The full garbage collection operation performs the following actions:

  • Performs a RAM garbage collection operation.
  • Marks objects in flash memory that are no longer referenced or no longer persisted.
  • Releases any nonpersistent object handles in RAM and flash memory.

The system might initiate a full garbage collection operation in the following situations:

  • The BlackBerry Java Virtual Machine cannot allocate an object because of a lack of available space in RAM.
  • A process is about to exceed its currently allocated heap size.
  • The BlackBerry JVM cannot allocate a new object because the object handles are not available.
  • The BlackBerry smartphone is idle.

Was this information helpful? Send us your comments.