10-07-2008 05:23 PM
The game I am working on keeps various objects in a persistent store, user prefs, saved game, title screen state etc. On the Pearl, Curve and 8800 this is working fine, but on the BlackBerry 9000 Bold it seems that the persistent store is occasionally getting commit() or forceCommit() at an unexpected point in the runtime. This happens while the device is left to idle and turn off the backlight.
It seems to me like a reasonable thing to do this occasionally to make sure everything is saved, however, at certain points the objects in the store are not suitable for saving and this throws a NonPersistableObjectException.
Is there anything (events scheduled/triggered by the OS) which would be causing this? I am trying to rework the game to remove everything from the store when it is in use. Does that seem reasonable? Any advice would be appreciated.
Solved! Go to Solution.
10-08-2008 10:25 AM
A commit can be called when garbage collection is taking place. You can read about the different types of garbage collection in this white paper.
Garbage collection in the BlackBerry Java Development Environment