From 2bd72b12c92bc9020d93e4bcbabc2fe2eb114b77 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 21 Dec 2018 19:59:46 -0800 Subject: [PATCH] CoreRT-specific Object.cs changes - Fix build breaks - Apply same cleanup to all related files Signed-off-by: dotnet-bot --- src/System.Private.CoreLib/shared/System/Object.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Object.cs b/src/System.Private.CoreLib/shared/System/Object.cs index 8d875fc..3319b2d 100644 --- a/src/System.Private.CoreLib/shared/System/Object.cs +++ b/src/System.Private.CoreLib/shared/System/Object.cs @@ -22,6 +22,14 @@ namespace System { } + // Allow an object to free resources before the object is reclaimed by the GC. + // This method's virtual slot number is hardcoded in runtimes. Do not add any virtual methods ahead of this. + [NonVersionable] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1821:RemoveEmptyFinalizers")] + ~Object() + { + } + // Returns a String which represents the object instance. The default // for an object is to return the fully qualified name of the class. public virtual string ToString() @@ -69,11 +77,5 @@ namespace System { return RuntimeHelpers.GetHashCode(this); } - - // Allow an object to free resources before the object is reclaimed by the GC. - [NonVersionable] - ~Object() - { - } } } -- 2.7.4