Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Managed/Unmanaged Object in Realm DB?

Tags:

android

realm

What is meant by the term Managed Object and Unmanaged Object in Realm DB ?? I have searched this term everywhere and I found these links quora & managedObject. But still unsure.

I know it's trivial but in Realm docs nowhere it is explained.

like image 751
Sudhanshu Gaur Avatar asked Dec 17 '17 20:12

Sudhanshu Gaur


Video Answer


1 Answers

I found some explanations in realm document.

FAQ/What is the difference between a normal Java object and a Realm object?

Instances of Realm objects can be either managed or unmanaged.

  • Managed objects are persisted in Realm, are always up to date and thread confined. They are generally more lightweight than the unmanaged version as they take up less space on the Java heap.
  • Unmanaged objects are just like ordinary Java objects, they are not persisted and they will not be updated automatically. They can be moved freely across threads.
like image 158
Toris Avatar answered Oct 22 '22 12:10

Toris