Garbage collection and memory management in M-Business Client

To maximize performance on the device, M-Business Client performs major memory clean-up—"garbage collection" functions—only when the user closes M-Business Client.

The amount of memory that becomes unavailable in each hour that a user browses typical pages on the device was found to be minimal—users could browse for days without running into memory problems. On the other hand, the performance degradation experienced by users if garbage collection is performed more frequently was found to be significant enough that users objected: whether garbage collections was performed each time the user moves to a new page, or at a specified time interval like every 5 minutes, users found the slow-down objectionable. Thus the design decision was made early on that M-Business Client would perform major memory clean-up functions only when the user closes the application at the end of a session.

It is possible to create pages that will use up all available memory before the user is ready to close M-Business Client. To avoid running out of memory, developers writing JavaScript or C code to be executed from HTML pages displayed in M-Business Client need to use good programming practices. You must ensure that any allocated memory is freed up as soon as it is no longer needed:

For details on JavaScript programming practices that keep applications from running out of memory on M-Business Client, see Resource allocation limitations.

For information on C programming practices that keep applications from running out of memory on M-Business Client, see Managing memory.

Tip

If a user never closes M-Business Client on a device, eventually all available memory will be used up. To avoid this potential problem, you should design applications in such a way that users are encouraged to close M-Business Client at the end of an application session.