android - Database reference or recreation? -


i have quick performance question: quicker , efficient on memory use static singleton database reference or reopen every time need access something?

thanks help,

~aedon

in android databases aren't kept in memory keeping reference light on memory, use file locks. using singleton first choice, however, if you're using in service or single activity, doesn't need static. if you're database instance keeps reference context, means avoid making static because source of memory leaks.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -