1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:42:54 +08:00

Null disposal token after use

This commit is contained in:
Dean Herbert 2022-06-16 23:29:33 +09:00
parent 4526f8c07d
commit 7b0fad6461

View File

@ -133,6 +133,8 @@ namespace osu.Game.Database
Task.Factory.StartNew(() =>
{
realm.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.realm"), realmBlockOperations);
realmBlockOperations = null;
efContextFactory.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.db"));
using (var ef = efContextFactory.Get())
@ -218,7 +220,7 @@ namespace osu.Game.Database
// If we were to not do this, the migration would run another time the next time the user starts the game.
deletePreRealmData();
realmBlockOperations.Dispose();
realmBlockOperations?.Dispose();
migrationCompleted.SetResult(true);
efContextFactory.SetMigrationCompletion();