Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1025

Realm::get_shared_realm should close the Realm in case of an error

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None

      When an error occurs during Realm::get_shared_realm, the error gets propagated to the developer, but the Realm instance remains open, which then prevents deleting it. There's no way for the developer to then close it because they never get a reference to it. To repro, open a Realm with initialization_function set to something that throws, then try to delete the Realm file.

            Assignee:
            Unassigned Unassigned
            Reporter:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: