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
Post a Comment