-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closeable and clear on close #105
Comments
Hi. Do you mean |
There seems to be a multiplatform-ready interface in the standard library: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-auto-closeable/ |
Hi @JanMalch - apologies for the delayed response.
Can you walk through a typical use case for this feature? deleting the file on close feels like an odd behaviour for a storage library |
I was thinking about Android's ViewModel. You add the store as a closeable, so that it gets deleted, when the VM isn't in the backstack anymore. This way I can dump lots of data in a cache file, instead of keeping the data in memory, when the VM is in the backstack. |
Hi, I think it would be useful if the store implements
AutoCloseable
and one can configure the store to delete all data when it's closed. What do you think?The text was updated successfully, but these errors were encountered: