Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Prevent a memory leak when implementing an ApplicationMenuItem

by Retired ‎02-12-2010 04:13 PM - edited ‎02-17-2010 10:03 AM (1,944 Views)


This article applies to the following:

  • BlackBerry® smartphones based on Java® technology


When implementing an ApplicationMenuItem, it is possible to create a memory leak. The memory leak occurs when a reference to an application’s process (i.e., UiApplication) is stored in the ApplicationMenuItem. Storing a reference to an application process in an object that is registered with the system (e.g., an ApplicationMenuItem) causes the application to never be shut down completely.

To avoid this, do not store a reference to UiApplication in an ApplicationMenuItem.

Users Online
Currently online: 12 members 724 guests
Please welcome our newest community members: