Skip to content

Should GeneratedColumn and others be garbage collected? #2691

Answered by simolus3
spauldhaliwal asked this question in Q&A
Discussion options

You must be logged in to vote

I just ran the example app from this repository and inspected the instance count from the DevTools memory inspector. It only uses about 10 DatabaseConnection instances, but I think having a little more than that not necessarily unusual if the database is set up across isolates (e.g. with NativeDatabase.createInBackground). Things like LazyDatabase also increment the number, but these are live objects that really are used.

The example app contains functionality to restore databases from a backup, which is a good indicator for memory leaks since it completely re-opens the database. But trying that a few times and looking at the live instance count, I couldn't find anything suspicious.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@simolus3
Comment options

Answer selected by spauldhaliwal
@spauldhaliwal
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants