I have a MIDlet that incorporates an 'autosave' function - when the MIDlet is shutdown, the state is saved to a RecordStore. The exception to this is when the MIDlet is shutdown from the 'Exit' option on my main menu - in this case, the autosave RecordStore should be deleted.
I am achieving this by calling destroyApp(false) from the exit method. Then, in destroyApp I know that if the unconditional flag is true it is a forced shutdown and I want to autosave - otherwise it is a user requested shutdown and I want to delete the existing autosave.
The problem I am having is that the autosave RecordStore is never being deleted. I am calling
and it is executing without an exception, but it still exists when I next start the emulator. This works in the Sun Wireless Toolkit emulator and in a Sony-Ericsson emulator I have, but not the Nokia one (I am using the 7210).
Anyone any ideas why??
P.S. I know that the RecordStore is closed before I try to delete it, so that's not the problem.