Realm is designed to be used on mobile devices with as little memory as possible. All object properties are lazily read and not kept in memory. Just use the Realm in the main isolate , preferably opening it only once. You can pass around Realm objects and if you want to update them just wrap the setters in a realm.write
call. This is the most optimal way of using Realm.
Closing eagerly the Realm will not lead to saving much memory, if at all.
1 Like