Sign in Go Pro

Realm

Deleting Objects

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next

Previous

About

Storing data in Realm is easy. Deleting that same data is just as simple. You can delete object references, lists of data, particular objects, and even delete all the data in a Realm database very easily.

In this lesson you will learn:

  • How to delete an object from Realm.
  • How to delete an object reference - How to delete the first item from a RealmList and from RealmResults.
  • How to delete the last item from a RealmList and from RealmRestults.
  • The difference between deleteFromRealm(int location) and the Java remove(int location) methods.
  • How to remove an item from a RealmList with the remove method.
  • How to remove all types of an object from Realm with one call.
  • How to delete all data in the Realm database.
  • How to delete a Realm based upon its RealmConfiguration

Links

Sample Code

Instructor

Links

Lessons in Realm