mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Move null to finally
This commit is contained in:
parent
7809566f16
commit
bf6c6682bc
@ -131,12 +131,17 @@ namespace osu.Game.Database
|
||||
var realmBlockOperations = realm.BlockAllOperations();
|
||||
|
||||
Task.Factory.StartNew(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
realm.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.realm"), realmBlockOperations);
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Above call will dispose of the blocking token when done.
|
||||
// Clean up here so we don't accidentally dispose twice.
|
||||
realmBlockOperations = null;
|
||||
}
|
||||
|
||||
efContextFactory.CreateBackup(Path.Combine(backup_folder, $"client.{backupSuffix}.db"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user