deleteMany<T extends RealmObject> method Null safety

void deleteMany<T extends RealmObject>(
  1. Iterable<T> items
)

Deletes many RealmObjects from this Realm.

Throws RealmException if there is no active write transaction.

Implementation

void deleteMany<T extends RealmObject>(Iterable<T> items) {
  if (items is RealmResults<T>) {
    realmCore.resultsDeleteAll(items);
  } else if (items is RealmList<T>) {
    realmCore.listDeleteAll(items);
  } else {
    for (T realmObject in items) {
      realmCore.deleteRealmObject(realmObject);
    }
  }
}