Skip to content

Deallocating database, deleting it and rebuilding one. #139

@FredericJacobs

Description

@FredericJacobs

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions