Flash memory is non-volatile, which means unlike Random Access Memory (RAM, used for heap and stack memory) the values stored in flash are preserved after the program exists or the phone is powered down. There are two places where flash memory resides on a Nokia Series 40 phone: internal memory and on a memory card. Phone internal flash memory is a chip on the phone’s motherboard, and this is where your application’s Record Management System (RMS) and for example photos, contacts and other data are stored. For security reasons, your application has limited rights to access files on the phone but it can read and create files in some directories.
The RMS is a common way to use internal non-volatile memory, because it does not require any special security permissions. File system access is more common with the memory card, and since memory cards can be quite large (for example 32 GB, check your phone’s specifications), this is the preferred place to store large files like multimedia and databases.
Use flash memory for storing data, such as saving game states or information downloaded over the internet, to improve the user experience and performance of your application. But be aware that reading and writing flash memory is much slower than operating on RAM. Therefore, all flash operations should be executed asynchronously, on a worker thread separate from your user interface thread.
You can see the benefit of removing synchronous flash references in the section Case example: Battle Tank.