deleteRealm

fun deleteRealm(configuration: Configuration)

Deletes the realm file along with other related temporary files specified by the given RealmConfiguration from the filesystem. The temporary file with ".lock" extension won't be deleted.

All Realm instances pointing to the same file must be closed before calling this method.

WARNING: For synchronized realms there is a chance that an internal Realm instance on the background thread is not closed even though the user controlled Realm instances are closed. This will result in an IllegalStateException. See issue https://github.com/realm/realm-java/issues/5416 for more details.

Parameters

configuration

a Configuration object that defines the Realm.

Throws

if an error occurred while deleting the Realm files.