kotlin-extensions / io.realm.kotlin / io.realm.RealmModel / deleteFromRealm

deleteFromRealm

fun RealmModel.deleteFromRealm(): Unit

Deletes the object from the Realm it is currently associated with.

After this method is called the object will be invalid and any operation (read or write) performed on it will fail with an IllegalStateException.

Exceptions

IllegalStateException - if the corresponding Realm is closed or in an incorrect thread.

See Also

isValid