Browse Source
volatile read on totalUndisposedAllocationCount
Co-authored-by: Günther Foidl <gue@korporal.at>
pull/1969/head
Anton Firszov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/ImageSharp/Diagnostics/MemoryDiagnostics.cs
|
|
|
@ -46,7 +46,7 @@ namespace SixLabors.ImageSharp.Diagnostics |
|
|
|
/// </summary>
|
|
|
|
public static int TotalUndisposedAllocationCount => totalUndisposedAllocationCount; |
|
|
|
|
|
|
|
internal static bool MemoryResourceLeakedSubscribed => undisposedMemoryResourceSubscriptionCounter > 0; |
|
|
|
internal static bool MemoryResourceLeakedSubscribed => Volatile.Read(ref undisposedMemoryResourceSubscriptionCounter) > 0; |
|
|
|
|
|
|
|
internal static void IncrementTotalUndisposedAllocationCount() => |
|
|
|
Interlocked.Increment(ref totalUndisposedAllocationCount); |
|
|
|
|