Best practices for using MapDB with Android

852 Views Asked by At

What is the best way to use MapDB with Android, especially with regards to the Activity lifecycle? Will keeping a singleton instance of DB around cause memory issues as long as all map instances are garbage collected correctly?

What will happen if an instance of DB is garbage collected before it is closed (supposing all transactions have been commited)?

1

There are 1 best solutions below

0
On

There are not really best practices. Just make sure that db is closed correctly after writes finish.

If you want to use newest MapDB 2.0, you must remove file UnsafeStuff.java and recompile mapdb project