Java documentation for Realm
class has method close
. It is written in method details: "It's important to always remember to close Realm instances when you're done with it in order not to leak memory, file descriptors or grow the size of Realm file out of measure."
Neither Objective-C documentation for RLMRealm class nor Swift documentation for Realm class show anything similar.
Do I have to bother about closing Realm database in Objective-C and Swift? Why are these differences between platforms?
No you don't have to bother about closing the database.
If Realm doesn't provide a close
method, the closing is handled by Realm itself. As you already mentioned, there are differences between different platforms/operation systems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With