diff options
Diffstat (limited to 'src/mscorlib/src/System/GC.cs')
-rw-r--r-- | src/mscorlib/src/System/GC.cs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mscorlib/src/System/GC.cs b/src/mscorlib/src/System/GC.cs index e338e44526..fd09ef7984 100644 --- a/src/mscorlib/src/System/GC.cs +++ b/src/mscorlib/src/System/GC.cs @@ -16,7 +16,6 @@ namespace System { //This class only static members and doesn't require the serializable keyword. using System; - using System.Security.Permissions; using System.Reflection; using System.Security; using System.Threading; @@ -98,7 +97,6 @@ namespace System { private static extern int GetMaxGeneration(); [MethodImplAttribute(MethodImplOptions.InternalCall)] - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] private static extern int _CollectionCount (int generation, int getSpecialGCCount); [MethodImplAttribute(MethodImplOptions.InternalCall)] @@ -206,7 +204,6 @@ namespace System { _Collect(generation, iInternalModes); } - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public static int CollectionCount (int generation) { if (generation<0) @@ -216,18 +213,6 @@ namespace System { Contract.EndContractBlock(); return _CollectionCount(generation, 0); } - - // pass in true to get the BGC or FGC count. - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] - internal static int CollectionCount (int generation, bool getSpecialGCCount) - { - if (generation<0) - { - throw new ArgumentOutOfRangeException(nameof(generation), Environment.GetResourceString("ArgumentOutOfRange_GenericPositive")); - } - Contract.EndContractBlock(); - return _CollectionCount(generation, (getSpecialGCCount ? 1 : 0)); - } // This method DOES NOT DO ANYTHING in and of itself. It's used to // prevent a finalizable object from losing any outstanding references @@ -265,7 +250,6 @@ namespace System { // If we insert a call to GC.KeepAlive(this) at the end of Problem(), then // Foo doesn't get finalized and the stream stays open. [MethodImplAttribute(MethodImplOptions.NoInlining)] // disable optimizations - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public static void KeepAlive(Object obj) { } @@ -296,10 +280,8 @@ namespace System { // Indicates that the system should not call the Finalize() method on // an object that would normally require this call. [MethodImplAttribute(MethodImplOptions.InternalCall)] - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] private static extern void _SuppressFinalize(Object o); - [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public static void SuppressFinalize(Object obj) { if (obj == null) throw new ArgumentNullException(nameof(obj)); |