diff --git a/src/object-store/shared_realm.cpp b/src/object-store/shared_realm.cpp index 77d39c21..42217a8f 100644 --- a/src/object-store/shared_realm.cpp +++ b/src/object-store/shared_realm.cpp @@ -444,8 +444,8 @@ void RealmCache::invalidate_all() { std::lock_guard lock(m_mutex); - for (auto &path_realms:m_cache) { - for (auto &realm_iter:path_realms.second) { + for (auto &path_realms : m_cache) { + for (auto &realm_iter : path_realms.second) { if (auto realm = realm_iter.second.lock()) { realm->invalidate(); } diff --git a/tests/RealmJSTests.mm b/tests/RealmJSTests.mm index cd5ea149..5f556422 100644 --- a/tests/RealmJSTests.mm +++ b/tests/RealmJSTests.mm @@ -92,6 +92,7 @@ static JSClassRef s_globalClass; realm::Realm::s_global_cache.invalidate_all(); realm::Realm::s_global_cache.clear(); + // FIXME - find all realm files in the docs dir and delete them rather than hardcoding these DeleteRealmFilesAtPath(RealmPathForFile(@"test.realm")); DeleteRealmFilesAtPath(RealmPathForFile(@"test1.realm")); DeleteRealmFilesAtPath(RealmPathForFile(@"test2.realm"));