Is it possible to delete an entire instance? #837
-
Is it possible to delete an entire instance? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Just call |
Beta Was this translation helpful? Give feedback.
-
Oh, if you want to delete the underlying storage as well, you should call OS's |
Beta Was this translation helpful? Give feedback.
-
So if I want to completely wipe out the storage and mmkv instance, I would first have to remove keys and then close the instance? I'm asking because in my react native app, I remove the keys from the encrypted storage, but I cannot initialise another instance with the same id, but different encryption key. I first have to check if the instance was created before, in this case I empty and decrypt it on removal, then next time I instance it with the same id and encrypt it with a new key right after. |
Beta Was this translation helpful? Give feedback.
-
I tried looking before in the source code but didn't manage to find those methods, that's why I asked here. Can you please link it for me? |
Beta Was this translation helpful? Give feedback.
-
In your scenario, you may be looking for
|
Beta Was this translation helpful? Give feedback.
In your scenario, you may be looking for
reKey()
. Here's how it's done right with reKey:remove()
orremoveAll()
.reKey()
with the new encryption key.