Skip to content

J2ME memory optimization tip. Multidimensional arrays.

Mobile phone is a resource constrained device, that imposes some challenges for application developers.
Quite often it is very convenient to use multidimensional arrays, though when doing so, we have to keep in mind that there is an overhead price to pay, that is, for every array object created, overhead == 16 bytes.
int array of size:0 [...]

String memory footprint on mobile (RAZR) and techniques to optimize it.

We are currently working on the application that will have to receive XML. There is a potential problem here, that it is not always known how big the payload will be. The problematic outcome is, it will simply blow the memory.
Here are the results of method that creates new string object of incremental size and [...]