mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Make realm a non-drawable component to better order disposal
Until now, the `RealmContextFactory` would be disposed as part of the drawable hierarchy. This is too early, as it may be being used by higher level components (like `ConfigManager`s, see #15115) that perform final operations after the drawables have been disposed. Seems to make sense moving this out of the drawable hierarchy and in line with how we were doing things with EF.
This commit is contained in:
@ -187,8 +187,6 @@ namespace osu.Game
|
||||
|
||||
dependencies.Cache(realmFactory = new RealmContextFactory(Storage, "client"));
|
||||
|
||||
AddInternal(realmFactory);
|
||||
|
||||
dependencies.CacheAs(Storage);
|
||||
|
||||
var largeStore = new LargeTextureStore(Host.CreateTextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures")));
|
||||
@ -529,6 +527,7 @@ namespace osu.Game
|
||||
LocalConfig?.Dispose();
|
||||
|
||||
contextFactory?.FlushConnections();
|
||||
realmFactory?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user