realm-kotlin
realm-kotlin copied to clipboard
Correctly delete Realm file when initializing data or subscriptions fails.
When initialData or initialSubscriptions throw an exception, we should delete the Realm file, so the logic can be retried, but this is currently difficult to achieve, especially for synchronized Realms due to the SyncClient holding on to Realm file handles.
Core will be providing a solution for this which we should adopt: https://github.com/realm/realm-core/pull/5540