1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 11:27:24 +08:00

Update missed xmldoc/comments

This commit is contained in:
Dean Herbert 2021-11-30 11:56:53 +09:00
parent 2e31f5a338
commit f3f77fa053
2 changed files with 3 additions and 4 deletions

View File

@ -38,10 +38,10 @@ namespace osu.Game.Database
bool IsManaged { get; } bool IsManaged { get; }
/// <summary> /// <summary>
/// Resolve the value of this instance on the current thread's context. /// Resolve the value of this instance on the update thread.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// After resolving the data should not be passed between threads. /// After resolving, the data should not be passed between threads.
/// </remarks> /// </remarks>
T Value { get; } T Value { get; }
} }

View File

@ -95,8 +95,7 @@ namespace osu.Game.Database
throw new InvalidOperationException($"Can't use {nameof(Value)} on managed objects from non-update threads"); throw new InvalidOperationException($"Can't use {nameof(Value)} on managed objects from non-update threads");
// When using Value, we rely on garbage collection for the realm instance used to retrieve the instance. // When using Value, we rely on garbage collection for the realm instance used to retrieve the instance.
// As we are sure that this is on the same thread // As we are sure that this is on the update thread, there should always be an open and constantly refreshing realm instance to ensure file size growth is a non-issue.
var realm = Realm.GetInstance(data.Realm.Config); var realm = Realm.GetInstance(data.Realm.Config);
return realm.Find<T>(ID); return realm.Find<T>(ID);