Skip to content

Commit

Permalink
Turn log level to off before nullifying the logger
Browse files Browse the repository at this point in the history
  • Loading branch information
takameyer committed Jul 4, 2023
1 parent bbf11e3 commit 61f60fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/realm/bindgen/src/templates/jsi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,7 @@ export function generate({ rawSpec, spec, file: makeFile }: TemplateContext): vo
extern "C" {
void realm_jsi_invalidate_caches() {
// Clear the default logger, to prevent it from holding on to a pointer that was released
realm::util::Logger::set_default_level_threshold(realm::util::Logger::Level::off);
realm::util::Logger::set_default_logger(nullptr);
// Close all cached Realms
realm::_impl::RealmCoordinator::clear_all_caches();
Expand Down

0 comments on commit 61f60fa

Please sign in to comment.