Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-780

Does a realm need to be manually closed.

      I am working on an app and by it's odd nature I need to work with multiple realm. So I'm planning on opening a realm in function bodies with current config. My question is in this case will the realm object need manual closing in the end. Below is an example code snippet for better understanding.

      Unable to find source-code formatter for language: kt. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      suspend fun insertFoo(foo: Foo, config: CustomConfig) {
          val realm = Realm.forConfig(config)
      
          // Inserting with realm
      
         realm.close() // Is this necessary??
      }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: