DataBaseHelper, Singleton or not?
问题 There have been a few questions on this topic but none giving firm reasons for why there should or shouldn't be a single or multiple instances of the databaseHelper. When is it a good idea to have multiple instances of DatabaseHelper and when is it not. Is less complexity (if that is actually the case ) a good enough reason to have just a single instance ? 回答1: Your DatabaseHelper should be a singleton for sure. Each helper maintains the single connection to the database. If you have multiple