04-29-2011 03:07 AM
I have designed the application as hide and display a page, to avoid the reloading
I saw some code to exit the application as the blackberry.app.exit() in blackberry document.
the application get closed properly but the database used in that project is not released from the application.
for this i tryed to delete the database folder manually. it says "This is currently is in use."
can any one know the reason for this.
the application is not in running state and the application is not in the background what was the problem?.
04-29-2011 02:37 PM
I think this is because the device software still has a lock on the DB. It might release if you reset the device, or uninstall the app.
Also, are you setting your DB object to null before you call blackberry.app.exit() or exiting the app? I believe doing this may indirectly 'close' the DB (and help prevent a memory leak).
05-02-2011 12:44 AM
I am making the DB object to null before blackberry.app.exit() or exiting the app
and I checked the some senarios where DB folder can be deleted.
1) Device restart,
2) After closing the application connectting it with the USB to System,
3) When ever the application crashes etc.
When I get the DOM 11 Exception at the Database operation, in normal cases it was not able to open once again, but when I connect the Torch 9800 with the sytem using USB then i opened the application it automatically created the new database in the SDcard (I am not sure what was the reason for that)
Their is two way to exit my application.
one is by pressing the back button their i handled the back button, other way is by pressing the menu button and select the close option- since it was not control of code, their i am not making the DB object is null;
for the both the cases the application does not release the Database, I think because of this the Database open count get increased and file read/write problem may come.
that was causing the most of the application with database they are getting the DOM exception 11.