Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 13
Registered: ‎09-08-2008
My Device: Not Specified
Accepted Solution

Bold persistent store occasionally being flushed.

Hi,

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.

 

Thanks,

Steven.

Highlighted
BlackBerry Development Advisor
Posts: 15,803
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Bold persistent store occasionally being flushed.

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

http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&objId=832210&objAction=browse&s...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 13
Registered: ‎09-08-2008
My Device: Not Specified

Re: Bold persistent store occasionally being flushed.

Thanks very much, that explains what I'm seeing.