Hey,
In my app, I want the user to be able to wipe the database when the user deletes his account.
To do so, I wanted to make sure to deallocate the YapDatabase instance that I initiated and then delete the file and recreate the database.
Thing is, every database connection in the respective view controllers that might still be in the hierarchy have database connections to the previous database instance, preventing it to be deallocated.
What's the best way to deal with this situation? NSNotificationCenter notification to set to nil view controller database connections before setting the YapDatabase instance to nil?
Hey,
In my app, I want the user to be able to wipe the database when the user deletes his account.
To do so, I wanted to make sure to deallocate the YapDatabase instance that I initiated and then delete the file and recreate the database.
Thing is, every database connection in the respective view controllers that might still be in the hierarchy have database connections to the previous database instance, preventing it to be deallocated.
What's the best way to deal with this situation? NSNotificationCenter notification to set to nil view controller database connections before setting the YapDatabase instance to nil?