|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.lowmemory.LowMemoryManager
public abstract class LowMemoryManager
The LowMemoryManager maintains memory resources on the device
when the device becomes over-taxed and runs low on memory. When the device
becomes low on memory, the LowMemoryManager frees up memory
resources by prioritizing objects in memory, and marking objects it deems
less critical for deletion by the VM. Old mail messages and calendar
entries are typically deleted first.
The LowMemoryListener class receives and reacts to
LowMemoryManager events, while the
LowMemoryFailedManager class reports
LowMemoryManager failures.
LowMemoryListener,
LowMemoryFailedListener| Field Summary | ||
|---|---|---|
|
static long |
GUID_FLASH_LOW
The GUID of the global event, posted by the system, to notify the LowMemoryManager that the system is low on memory. |
| Method Summary | ||
|---|---|---|
|
static void |
addLowMemoryFailedListener(LowMemoryFailedListener listener)
Adds a LowMemoryFailedListener. |
|
static void |
addLowMemoryListener(LowMemoryListener listener)
Adds a LowMemoryListener. |
|
static void |
markAsRecoverable(Object o)
Marks stale objects in memory for deletion by the VM. |
|
static void |
poll()
Calls the LowMemoryManager and tells it to poll device memory
levels. |
|
static void |
removeLowMemoryFailedListener(LowMemoryFailedListener listener)
Removes a LowMemoryFailedListener. |
|
static void |
removeLowMemoryListener(LowMemoryListener listener)
Removes a LowMemoryListener. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long GUID_FLASH_LOW
LowMemoryManager that the system is low on memory.
| Method Detail |
|---|
public static void addLowMemoryFailedListener(LowMemoryFailedListener listener)
LowMemoryFailedListener.
The LowMemoryFailedListener listens for failed
LowMemoryManager operations.
listener - The LowMemoryFailedListener to add.public static void addLowMemoryListener(LowMemoryListener listener)
LowMemoryListener.
The LowMemoryListener listens for and reacts to
LowMemoryManager operations.
listener - The LowMemoryListener to add.public static void removeLowMemoryListener(LowMemoryListener listener)
LowMemoryListener.
listener - The LowMemoryListener to remove.public static void removeLowMemoryFailedListener(LowMemoryFailedListener listener)
LowMemoryFailedListener.
listener - The LowMemoryFailedListener to remove.public static void poll()
LowMemoryManager and tells it to poll device memory
levels. If memory levels are low, the LowMemoryListeners are
invoked in order to free up stale objects and create more free memory.
The poll method is invoked periodically by the VM during backup and restore operations and during memory intensive operations to indicate that it is time to clean up resources.
public static void markAsRecoverable(Object o)
o - The object to be released from memory.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.