Monday, November 9, 2026
HomeiOS Developmentandroid - When are you "accomplished" with a realm?

android – When are you “accomplished” with a realm?

[ad_1]

I’m at present engaged on a challenge with Expo and Realm. I need to combine Realm into my App, however I do not fairly get the road:

You will need to keep in mind to name the shut() technique when accomplished
with a realm
occasion to keep away from reminiscence leaks.

-> https://docs.mongodb.com/realm/sdk/react-native/examples/open-and-close-a-realm/#close-a-realm

I imply: what’s the definition of being accomplished? As quickly as my app is closed or as quickly as I fetch the information I wished to? Or ought to I open and shut the realm on a regular basis a person modifications an entry?

I already did a number of analysis and I do know that it it fairly costly (useful resource sensible) to start out a brand new realm on a thread. But when there’s already a realm working (UI Thread for Listeners) it is not price costly in any respect.

Guess I’m not certain on how one can use realm inside my code accurately.

Thanks upfront!

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments