diff options
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs b/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs new file mode 100644 index 000000000..3f35f816a --- /dev/null +++ b/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs @@ -0,0 +1,28 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +/*============================================================ +** +** +** Deriving from this class will cause any finalizer you define to be critical +** (i.e. the finalizer is guaranteed to run, won't be aborted by the host and is +** run after the finalizers of other objects collected at the same time). +** +** +===========================================================*/ + +namespace System.Runtime.ConstrainedExecution +{ + public abstract class CriticalFinalizerObject + { + protected CriticalFinalizerObject() + { + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1821:RemoveEmptyFinalizers")] + ~CriticalFinalizerObject() + { + } + } +} |