1606 references to GC
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs (1)
82GC.SuppressFinalize(this);
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceSubscriber.cs (1)
82GC.SuppressFinalize(this);
Client.TypedClient.IntegrationTests (1)
TypedProxyTests.4.0.0.cs (1)
613GC.Collect(2);
csc (1)
src\Compilers\Shared\BuildClient.cs (1)
333GC.SuppressFinalize(npcs);
dotnet-svcutil-lib (6)
FrameworkFork\Microsoft.CodeDom\Compiler\TempFiles.cs (1)
71GC.SuppressFinalize(this);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlElementList.cs (1)
270GC.SuppressFinalize(this);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (2)
1464GC.SuppressFinalize(this); 1499GC.SuppressFinalize(this);
FrameworkFork\System.ServiceModel\SMDiagnostics\System\ServiceModel\Diagnostics\Activity.cs (1)
44GC.SuppressFinalize(this);
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\ServiceModelActivity.cs (1)
288GC.SuppressFinalize(this);
HealthChecksSample (4)
GCInfoHealthCheck.cs (4)
57var allocated = GC.GetTotalMemory(forceFullCollection: false); 61{ "Gen0Collections", GC.CollectionCount(0) }, 62{ "Gen1Collections", GC.CollectionCount(1) }, 63{ "Gen2Collections", GC.CollectionCount(2) },
HttpStress (1)
Program.cs (1)
626GC.KeepAlive(listener);
IdeCoreBenchmarks (4)
NavigateToBenchmarks.cs (4)
129GC.Collect(0, GCCollectionMode.Forced, blocking: true); 130GC.Collect(1, GCCollectionMode.Forced, blocking: true); 131GC.Collect(2, GCCollectionMode.Forced, blocking: true); 135GC.KeepAlive(roots);
InMemory.FunctionalTests (1)
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
TestFiles\ComponentInternalUsageDiagnosticsAnalyzerTest\UsersRendererTypesInMethodBody.cs (2)
14GC.KeepAlive(test); 17GC.KeepAlive(/*MMProperty*/frame.Component);
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
EndpointHtmlRendererTest.cs (1)
1645builder.AddAttribute(1, "onsubmit", () => { GC.KeepAlive(new object()); });
Microsoft.AspNetCore.Components.Performance (1)
RenderTreeDiffBuilderBenchmark.cs (1)
83GC.KeepAlive(diff);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
TestFiles\ComponentInternalUsageDiagnosticsAnalyzerTest\UsersRendererTypesInMethodBody.cs (2)
14GC.KeepAlive(test); 17GC.KeepAlive(/*MMProperty*/frame.Component);
Microsoft.AspNetCore.Components.Tests (1)
RendererTest.cs (1)
5916GC.KeepAlive(unrelatedThingToMakeTheLambdaCapture);
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHost.cs (1)
51GC.KeepAlive(typeof(JSInteropMethods));
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Hosting\RootComponentMappingTest.cs (1)
20GC.KeepAlive(mapping);
Microsoft.AspNetCore.Components.WebView (1)
WebViewManager.cs (1)
273GC.SuppressFinalize(this);
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
413 GC.SuppressFinalize(this);
Microsoft.AspNetCore.Cryptography.Internal.Tests (2)
UnsafeBufferUtilTests.cs (2)
58GC.KeepAlive(testHandle); 99GC.KeepAlive(testHandle);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateFactoryTests.cs (1)
597GC.KeepAlive(expectedParameterValue);
Microsoft.AspNetCore.Http.Microbenchmarks (14)
RouteValueDictionaryBenchmark.cs (14)
232GC.KeepAlive(kvp.Value); 243GC.KeepAlive(kvp.Value); 252GC.KeepAlive(dictionary["action"]); 253GC.KeepAlive(dictionary["controller"]); 254GC.KeepAlive(dictionary["id"]); 262GC.KeepAlive(dictionary["action"]); 263GC.KeepAlive(dictionary["controller"]); 264GC.KeepAlive(dictionary["id"]); 305GC.KeepAlive(action); 306GC.KeepAlive(controller); 307GC.KeepAlive(id); 318GC.KeepAlive(action); 319GC.KeepAlive(controller); 320GC.KeepAlive(id);
Microsoft.AspNetCore.InternalTesting (1)
CultureReplacer.cs (1)
66GC.SuppressFinalize(this);
Microsoft.AspNetCore.Mvc.Core.Test (2)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
1571GC.SuppressFinalize(this); 1588GC.SuppressFinalize(this);
Microsoft.AspNetCore.Mvc.Testing (2)
WebApplicationFactory.cs (2)
731GC.SuppressFinalize(this); 798GC.SuppressFinalize(this);
Microsoft.AspNetCore.Routing.Microbenchmarks (15)
EndpointMetadataCollectionBenchmark.cs (15)
49GC.KeepAlive(_items[i] as IMetadata1); 54GC.KeepAlive(_items[i] as IMetadata2); 59GC.KeepAlive(_items[i] as IMetadata3); 64GC.KeepAlive(_items[i] as IMetadata4); 69GC.KeepAlive(_items[i] as IMetadata5); 76GC.KeepAlive(_collection.GetMetadata<IMetadata1>()); 77GC.KeepAlive(_collection.GetMetadata<IMetadata2>()); 78GC.KeepAlive(_collection.GetMetadata<IMetadata3>()); 79GC.KeepAlive(_collection.GetMetadata<IMetadata4>()); 80GC.KeepAlive(_collection.GetMetadata<IMetadata5>()); 88GC.KeepAlive(item); 93GC.KeepAlive(item); 98GC.KeepAlive(item); 103GC.KeepAlive(item); 108GC.KeepAlive(item);
Microsoft.AspNetCore.Routing.Tests (4)
DataSourceDependentCacheTest.cs (1)
45GC.KeepAlive(cache.Value);
Matching\BarebonesMatcherConformanceTest.cs (1)
34GC.KeepAlive(new object[] { template, path, keys, values });
Matching\FullFeaturedMatcherConformanceTest.cs (2)
190GC.KeepAlive(keys); 191GC.KeepAlive(values);
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.Server.IIS (2)
Core\IISNativeApplication.cs (1)
43GC.SuppressFinalize(this);
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISExpressDeployer.cs (1)
474public void OnInvoked() => GC.KeepAlive(_handle.Wrapper);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\Disposable.cs (1)
38GC.SuppressFinalize(this);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
HttpConnectionManagerTests.cs (3)
28GC.Collect(); 29GC.WaitForPendingFinalizers(); 59GC.KeepAlive(httpConnection);
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
QuicConnectionListenerTests.cs (2)
411GC.Collect(); 412GC.WaitForPendingFinalizers();
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Shared\Buffers.MemoryPool\MemoryPoolBlock.cs (1)
17var pinnedArray = GC.AllocateUninitializedArray<byte>(length, pinned: true);
Microsoft.AspNetCore.SignalR.Client.Tests (2)
TimerAwaitableTests.cs (2)
21GC.Collect(); 22GC.WaitForPendingFinalizers();
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyLaunchManager.cs (1)
375GC.SuppressFinalize(this);
Microsoft.Build (8)
BackEnd\BuildManager\BuildManager.cs (1)
1233GC.SuppressFinalize(this);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
893GC.Collect();
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (1)
52GC.SuppressFinalize(this);
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
355GC.SuppressFinalize(this);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
241GC.SuppressFinalize(this);
Definition\ProjectCollection.cs (1)
1506GC.SuppressFinalize(this);
Instance\TaskRegistry.cs (1)
1205return GC.GetTotalAllocatedBytes(false);
PrintLineDebugger.cs (1)
67GC.SuppressFinalize(this);
Microsoft.Build.Engine.OM.UnitTests (2)
Construction\ProjectFormatting_Tests.cs (1)
36GC.Collect();
PrintLineDebugger.cs (1)
67GC.SuppressFinalize(this);
Microsoft.Build.Engine.UnitTests (14)
BackEnd\BuildEventArgTransportSink_Tests.cs (2)
136GC.Collect(); 137GC.WaitForPendingFinalizers();
BackEnd\TargetUpToDateChecker_Tests.cs (1)
40GC.Collect();
Evaluation\EvaluationLogging_Tests.cs (2)
29GC.Collect(); 38GC.Collect();
Evaluation\Evaluator_Tests.cs (2)
41GC.Collect(); 50GC.Collect();
Evaluation\ItemEvaluation_Tests.cs (2)
31GC.Collect(); 40GC.Collect();
Evaluation\Preprocessor_Tests.cs (1)
38GC.Collect();
Evaluation\ProjectRootElementCache_Tests.cs (4)
30GC.Collect(); 40GC.Collect(); 88GC.Collect(); 96GC.Collect();
Microsoft.Build.Tasks.CodeAnalysis (1)
RCWForCurrentContext.cs (1)
104GC.SuppressFinalize(this);
Microsoft.Build.Tasks.Core (3)
AssemblyDependency\DisposableBase.cs (1)
47GC.SuppressFinalize(this);
BuildCacheDisposeWrapper.cs (1)
44GC.SuppressFinalize(this);
PrintLineDebugger.cs (1)
67GC.SuppressFinalize(this);
Microsoft.Build.UnitTests.Shared (2)
DummyMappedDrive.cs (1)
82GC.SuppressFinalize(this);
TestEnvironment.cs (1)
74GC.SuppressFinalize(this);
Microsoft.Build.Utilities.Core (1)
PrintLineDebugger.cs (1)
67GC.SuppressFinalize(this);
Microsoft.Cci.Extensions (1)
Writers\Syntax\TokenSyntaxWriter.cs (1)
82GC.SuppressFinalize(this);
Microsoft.CodeAnalysis (2)
DiaSymReader\Writer\SymUnmanagedWriterImpl.cs (1)
80GC.SuppressFinalize(this);
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
367GC.KeepAlive(assemblyMetadata);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AbstractAnalysisData.cs (1)
21GC.SuppressFinalize(this);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
206var gcType = compilation.GetTypeByMetadataName(typeof(GC).FullName!); 213nameof(GC.SuppressFinalize)),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (62)
Compilation\ReferenceManagerTests.cs (1)
1414GC.KeepAlive(symbolA2);
Symbols\Metadata\PE\NoPia.cs (40)
340GC.KeepAlive(localTypes1_1); 341GC.KeepAlive(localTypes2_1); 342GC.KeepAlive(pia1_1); 343GC.KeepAlive(localTypes1_9); 344GC.KeepAlive(library1_9); 677GC.KeepAlive(localTypes1_1); 678GC.KeepAlive(localTypes2_1); 679GC.KeepAlive(pia1_1); 680GC.KeepAlive(localTypes1_9); 681GC.KeepAlive(library1_9); 701GC.KeepAlive(tc1); 702GC.KeepAlive(tc2); 860GC.KeepAlive(tc1); 861GC.KeepAlive(tc2); 862GC.KeepAlive(tc3); 863GC.KeepAlive(tc4); 864GC.KeepAlive(tc5); 865GC.KeepAlive(tc6); 866GC.KeepAlive(tc7); 938GC.KeepAlive(tc1); 939GC.KeepAlive(tc2); 940GC.KeepAlive(tc3); 941GC.KeepAlive(tc4); 942GC.KeepAlive(tc5); 943GC.KeepAlive(tc6); 944GC.KeepAlive(tc7); 1227GC.KeepAlive(tc1); 1228GC.KeepAlive(tc2); 1229GC.KeepAlive(tc3); 1230GC.KeepAlive(tc4); 1231GC.KeepAlive(tc5); 1232GC.KeepAlive(tc6); 1233GC.KeepAlive(tc7); 1343GC.KeepAlive(tc1); 1344GC.KeepAlive(tc2); 1345GC.KeepAlive(tc3); 1346GC.KeepAlive(tc4); 1347GC.KeepAlive(tc5); 1348GC.KeepAlive(tc6); 1349GC.KeepAlive(tc7);
Symbols\Retargeting\NoPia.cs (21)
639GC.KeepAlive(localTypes1_1); 640GC.KeepAlive(localTypes2_1); 641GC.KeepAlive(pia1_1); 642GC.KeepAlive(localTypes1_9); 643GC.KeepAlive(library1_9); 940GC.KeepAlive(localTypes1_1); 941GC.KeepAlive(localTypes2_1); 942GC.KeepAlive(pia1_1); 943GC.KeepAlive(localTypes1_9); 944GC.KeepAlive(library1_9); 1244GC.KeepAlive(localTypes1_1); 1245GC.KeepAlive(localTypes2_1); 1246GC.KeepAlive(pia1_1); 1247GC.KeepAlive(localTypes1_9); 1248GC.KeepAlive(library1_9); 1272GC.KeepAlive(tc1); 1273GC.KeepAlive(tc2); 1298GC.KeepAlive(tc1); 1299GC.KeepAlive(tc2); 1328GC.KeepAlive(tc1); 1329GC.KeepAlive(tc2);
Microsoft.CodeAnalysis.EditorFeatures (3)
InlineRename\UI\Adornment\RenameFlyoutViewModel.cs (1)
246GC.SuppressFinalize(this);
Preview\DifferenceViewerPreview.cs (1)
64GC.SuppressFinalize(this);
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (1)
251GC.SuppressFinalize(this);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Threading\StaTaskScheduler.cs (2)
56GC.Collect(); 57GC.WaitForPendingFinalizers();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Preview\PreviewWorkspaceTests.cs (1)
160GC.KeepAlive(exportProvider);
Utilities\AsynchronousOperationListenerTests.cs (1)
53GC.SuppressFinalize(this);
Microsoft.CodeAnalysis.Features (15)
AddImport\AbstractAddImportFeatureService.cs (1)
122GC.KeepAlive(semanticModel);
Completion\CompletionService.cs (2)
225GC.KeepAlive(semanticModel); 261GC.KeepAlive(semanticModel);
Completion\CompletionService_GetCompletions.cs (1)
119GC.KeepAlive(semanticModel);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
398GC.KeepAlive(compilation);
Copilot\ICopilotChangeAnalysisService.cs (1)
135GC.KeepAlive(semanticModel);
Diagnostics\Service\DocumentAnalysisExecutor.cs (6)
317GC.KeepAlive(rangeDeclaractionDiagnostics); 318GC.KeepAlive(rangeMethodBodyDiagnostics); 319GC.KeepAlive(rangeDiagnostics); 320GC.KeepAlive(wholeDeclarationDiagnostics); 321GC.KeepAlive(wholeMethodBodyDiagnostics); 322GC.KeepAlive(wholeDiagnostics);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
245GC.KeepAlive(compilation);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (2)
206var gcType = compilation.GetTypeByMetadataName(typeof(GC).FullName!); 213nameof(GC.SuppressFinalize)),
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.cs (1)
120GC.SuppressFinalize(this);
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
162GC.SuppressFinalize(this);
Microsoft.CodeAnalysis.Test.Utilities (4)
ObjectReference.cs (3)
141GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, blocking: true, compacting: true); 142GC.WaitForPendingFinalizers();
PDB\TestMetadataReferenceInfo.cs (1)
84GC.SuppressFinalize(this);
Microsoft.CodeAnalysis.UnitTests (11)
Collections\List\ICollection.Generic.Tests.cs (2)
363GC.Collect(); 366GC.KeepAlive(collection);
InternalUtilities\WeakListTests.cs (5)
102GC.KeepAlive(b.GetReference()); 204GC.KeepAlive(b); 244GC.KeepAlive(b); 284GC.KeepAlive(b); 316GC.KeepAlive(b);
MetadataReferences\FusionAssemblyPortabilityPolicy.cs (1)
70GC.SuppressFinalize(this);
Text\TextChangeTests.cs (3)
558GC.Collect(2, GCCollectionMode.Forced, blocking: true); 1266GC.Collect(2); 1267GC.WaitForFullGCComplete();
Microsoft.CodeAnalysis.Workspaces (13)
FindSymbols\ReferenceLocationExtensions.cs (1)
41GC.KeepAlive(compilation);
Remote\IRemoteKeepAliveService.cs (1)
78GC.SuppressFinalize(this);
TemporaryStorage\TemporaryStorageService.MemoryMappedInfo.cs (2)
135GC.GetTotalMemory(forceFullCollection: true); 139GC.Collect();
Workspace\IsolatedAnalyzerFileReference.cs (1)
99GC.KeepAlive(this);
Workspace\Solution\DocumentState.cs (8)
693GC.KeepAlive(newTreeContent); 694GC.KeepAlive(newTextContent); 695GC.KeepAlive(oldTreeContent); 696GC.KeepAlive(oldTextContent); 698GC.KeepAlive(newTree); 699GC.KeepAlive(newText); 700GC.KeepAlive(oldTree); 701GC.KeepAlive(oldText);
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SolutionTests\SolutionTests.cs (1)
5516GC.KeepAlive(finalSolution);
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (3)
138GC.Collect(2); 139GC.WaitForPendingFinalizers(); 140GC.Collect(2);
WorkspaceTests\AdhocWorkspaceTests.cs (1)
593GC.KeepAlive(exportProvider);
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
504GC.SuppressFinalize(this);
Microsoft.Data.Analysis.Tests (2)
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
504GC.SuppressFinalize(this);
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
93GC.Collect(2, GCCollectionMode.Forced, true);
Microsoft.DotNet.AsmDiff (1)
Csv\CsvWriter.cs (1)
21GC.SuppressFinalize(this);
Microsoft.DotNet.RemoteExecutor (1)
RemoteInvokeHandle.cs (1)
54GC.SuppressFinalize(this); // before Dispose(true) in case the Dispose call throws
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\DelegatingChatClient.cs (1)
35GC.SuppressFinalize(this);
Embeddings\DelegatingEmbeddingGenerator.cs (1)
40GC.SuppressFinalize(this);
SpeechToText\DelegatingSpeechToTextClient.cs (1)
37GC.SuppressFinalize(this);
Microsoft.Extensions.AI.Integration.Tests (3)
ChatClientIntegrationTests.cs (1)
40GC.SuppressFinalize(this);
EmbeddingGeneratorIntegrationTests.cs (1)
37GC.SuppressFinalize(this);
SpeechToTextClientIntegrationTests.cs (1)
28GC.SuppressFinalize(this);
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\TemplateExecutionTestBase.cs (1)
50GC.SuppressFinalize(this);
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
680GC.SuppressFinalize(this);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
ManualHealthCheck.cs (1)
47GC.SuppressFinalize(this);
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLoggerProvider.cs (1)
83GC.SuppressFinalize(this);
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFileProvider.cs (1)
204GC.SuppressFinalize(this);
PhysicalFilesWatcher.cs (1)
252GC.SuppressFinalize(this);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Telemetry\DownstreamDependencyMetadataManagerTests.cs (1)
94GC.SuppressFinalize(this);
Microsoft.Extensions.Identity.Core (2)
RoleManager.cs (1)
375GC.SuppressFinalize(this);
UserManager.cs (1)
398GC.SuppressFinalize(this);
Microsoft.Extensions.ObjectPool (1)
LeakTrackingObjectPool.cs (1)
71GC.SuppressFinalize(this);
Microsoft.Extensions.TimeProvider.Testing (2)
Timer.cs (2)
78GC.SuppressFinalize(this); 84GC.SuppressFinalize(this);
Microsoft.Gen.Logging.Generated.Tests (1)
Utils.cs (1)
57GC.SuppressFinalize(this);
Microsoft.Gen.Metrics.Generated.Tests (1)
MetricTests.cs (1)
44GC.SuppressFinalize(this);
Microsoft.Maui (1)
Animations\AnimationManager.cs (1)
127 GC.SuppressFinalize(this);
Microsoft.ML.AutoML (2)
AutoMLExperiment\IPerformanceMonitor.cs (2)
155GC.AddMemoryPressure(Convert.ToInt64(metrics.PeakMemoryUsage) * 1024 * 1024); 156GC.Collect();
Microsoft.ML.Core (2)
Data\Repository.cs (2)
118GC.SuppressFinalize(this); 145GC.SuppressFinalize(this);
Microsoft.ML.Data (1)
Data\SlotCursor.cs (1)
64GC.SuppressFinalize(this);
Microsoft.ML.DataView (1)
IDataView.cs (1)
168GC.SuppressFinalize(this);
Microsoft.ML.FastTree (3)
FastTree.cs (3)
351GC.Collect(2, GCCollectionMode.Forced); 352GC.Collect(2, GCCollectionMode.Forced); 451ch.Trace("GC Total Memory = {0} MB", GC.GetTotalMemory(true) / 1024 / 1024);
Microsoft.ML.OnnxTransformer (1)
OnnxUtils.cs (1)
463GC.SuppressFinalize(this);
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
669GC.SuppressFinalize(this);
Microsoft.ML.Recommender (1)
SafeTrainingAndModelBuffer.cs (1)
245GC.SuppressFinalize(this);
Microsoft.ML.StandardTrainers (1)
Optimizer\Optimizer.cs (1)
332long totalMem = GC.GetTotalMemory(true);
Microsoft.ML.TestFramework (1)
BaseTestClass.cs (1)
93GC.Collect(2, GCCollectionMode.Forced, true);
Microsoft.ML.TorchSharp (3)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
1014GC.SuppressFinalize(this);
Roberta\QATrainer.cs (1)
968GC.SuppressFinalize(this);
TorchSharpBaseTrainer.cs (1)
579GC.SuppressFinalize(this);
Microsoft.NET.StringTools.net35.UnitTests (3)
WeakStringCache_Tests.cs (3)
66GC.Collect(); 137GC.Collect(); 167GC.Collect();
Microsoft.NET.StringTools.UnitTests (3)
WeakStringCache_Tests.cs (3)
66GC.Collect(); 137GC.Collect(); 167GC.Collect();
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (1)
468GC.SuppressFinalize(Me)
Microsoft.VisualStudio.LanguageServices (7)
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.cs (1)
101GC.KeepAlive(enabledExtensions);
LanguageService\AbstractLanguageService`2.cs (1)
128GC.SuppressFinalize(this);
ProjectSystem\FileChangeTracker.cs (1)
194GC.SuppressFinalize(this);
ProjectSystem\InvisibleEditor.cs (1)
180GC.SuppressFinalize(this);
Snippets\SnippetExpansionClient.cs (1)
755GC.KeepAlive(compilation);
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (2)
94GC.SuppressFinalize(this); 118GC.SuppressFinalize(this);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
PersistentStorage\SQLiteV2PersistentStorageTests.cs (2)
57GC.Collect(); 58GC.WaitForPendingFinalizers();
MSBuild (1)
PrintLineDebugger.cs (1)
67GC.SuppressFinalize(this);
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
243[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.GC))]
netstandard (1)
netstandard.cs (1)
811[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.GC))]
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\PresentationCore\System\Windows\Media\StreamGeometryContext.cs (1)
61GC.SuppressFinalize(this);
PresentationCore (58)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
92GC.SuppressFinalize(this); // not strictly necessary, but if we ever have a subclass with a finalizer, this will be more efficient
MS\Internal\MediaTrace.cs (1)
131GC.SuppressFinalize(this);
MS\Internal\Text\TextInterface\Factory.cs (4)
158GC.KeepAlive(this); 222GC.KeepAlive(fontFile); 223GC.KeepAlive(this); 317GC.KeepAlive(this);
MS\Internal\TextFormatting\FullTextBreakpoint.cs (2)
102GC.KeepAlive(context); 201GC.KeepAlive(this);
MS\Internal\TextFormatting\FullTextLine.cs (5)
134GC.SuppressFinalize(this); 148GC.KeepAlive(this); 299GC.SuppressFinalize(this); 313GC.KeepAlive(context); 632GC.KeepAlive(context);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
76GC.SuppressFinalize(this);
MS\Internal\TextFormatting\TextPenaltyModule.cs (3)
51GC.SuppressFinalize(this); 62GC.KeepAlive(this); 85GC.KeepAlive(this);
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPane.cs (1)
231GC.SuppressFinalize(this);
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettings.cs (1)
155GC.SuppressFinalize(this);
System\Windows\FreezableCollection.cs (1)
1104GC.SuppressFinalize(this);
System\Windows\Input\Cursor.cs (1)
114GC.SuppressFinalize(this);
System\Windows\Input\InputProviderSite.cs (1)
39GC.SuppressFinalize(this);
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (2)
184GC.SuppressFinalize(this); 260GC.KeepAlive(this);
System\Windows\Input\Stylus\Common\StylusDeviceBase.cs (1)
61GC.SuppressFinalize(this);
System\Windows\Input\Stylus\Common\TabletDeviceBase.cs (1)
67GC.SuppressFinalize(this);
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (1)
227GC.SuppressFinalize(this);
System\Windows\Input\Stylus\Wisp\PenContext.cs (2)
40GC.KeepAlive(this); 181GC.SuppressFinalize(this);
System\Windows\Input\Stylus\Wisp\PenThread.cs (1)
42GC.KeepAlive(this);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (2)
502GC.KeepAlive(this); 1291GC.KeepAlive(this);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (1)
356GC.SuppressFinalize(this);
System\Windows\InterOp\D3DImage.cs (1)
880GC.SuppressFinalize(this);
System\Windows\InterOp\HwndPointerInputProvider.cs (1)
108GC.SuppressFinalize(this);
System\Windows\InterOp\HwndSource.cs (1)
348GC.SuppressFinalize(this);
System\Windows\InterOp\HwndTarget.cs (1)
707GC.SuppressFinalize(this);
System\Windows\Media\CompositionTarget.cs (1)
123GC.SuppressFinalize(this);
System\Windows\Media\DrawingContext.cs (1)
92GC.SuppressFinalize(this);
System\Windows\Media\FactoryMaker.cs (1)
91GC.SuppressFinalize(this);
System\Windows\Media\Imaging\BitmapDecoder.cs (4)
87GC.SuppressFinalize(this); 132GC.SuppressFinalize(this); 181GC.SuppressFinalize(this); 1412GC.SuppressFinalize(this);
System\Windows\Media\MediaContext.cs (1)
1452GC.SuppressFinalize(this);
System\Windows\Media\MediaContextNotificationWindow.cs (1)
96GC.SuppressFinalize(this);
System\Windows\Media\SafeMILHandleMemoryPressure.cs (2)
24GC.AddMemoryPressure(_gcPressure); 39GC.RemoveMemoryPressure(_gcPressure);
System\Windows\Media\StreamGeometryContext.cs (1)
61GC.SuppressFinalize(this);
System\Windows\Media\textformatting\TextBreakpoint.cs (1)
38GC.SuppressFinalize(this);
System\Windows\Media\textformatting\TextFormatterContext.cs (1)
130GC.KeepAlive(contextInfo);
System\Windows\Media\textformatting\TextLineBreak.cs (3)
38GC.SuppressFinalize(this); 60GC.SuppressFinalize(this); 97GC.KeepAlive(this);
System\Windows\Media\textformatting\TextParagraphCache.cs (4)
72GC.SuppressFinalize(this); 88GC.KeepAlive(context); 107GC.SuppressFinalize(this); 153GC.KeepAlive(this);
PresentationCore.Tests (4)
System\Windows\Media\Imaging\WriteableBitmap.Tests.cs (4)
53byte[] smallRect = GC.AllocateUninitializedArray<byte>(tileSize * tileSize * channels); 94Span<byte> smallRect = GC.AllocateUninitializedArray<byte>(tileSize * tileSize * channels, pinned: true); 135uint[] bigRect = GC.AllocateUninitializedArray<uint>(width * height); 159Span<uint> bigRect = GC.AllocateUninitializedArray<uint>(width * height, pinned: true);
PresentationFramework (66)
MS\Internal\Controls\StickyNote\StickyNoteHelper.cs (1)
72GC.SuppressFinalize(this);
MS\Internal\Data\EnumerableCollectionView.cs (1)
673GC.SuppressFinalize(this);
MS\Internal\Data\PropertyPathWorker.cs (2)
668GC.KeepAlive(target); // keep target alive during changes (bug 956831) 1773GC.SuppressFinalize(this);
MS\Internal\Data\XmlBindingWorker.cs (1)
501GC.KeepAlive(target); // keep target alive during process xml change (bug 1494812)
MS\Internal\Documents\ContentElementCollection.cs (1)
378GC.SuppressFinalize(this);
MS\Internal\Documents\DocumentGridPage.cs (1)
364GC.SuppressFinalize(this);
MS\Internal\Documents\HostedElements.cs (1)
44GC.SuppressFinalize(this);
MS\Internal\Documents\TextBoxLine.cs (1)
62GC.SuppressFinalize(this);
MS\Internal\Documents\UIElementIsland.cs (1)
168GC.SuppressFinalize(this);
MS\Internal\Printing\PrintDlgExMarshaler.cs (1)
848GC.SuppressFinalize(this);
MS\Internal\PtsHost\ContainerParagraph.cs (1)
56GC.SuppressFinalize(this);
MS\Internal\PtsHost\FloaterBaseParagraph.cs (1)
40GC.SuppressFinalize(this);
MS\Internal\PtsHost\FlowDocumentPage.cs (1)
69GC.SuppressFinalize(this);
MS\Internal\PtsHost\PageBreakRecord.cs (1)
75GC.SuppressFinalize(this);
MS\Internal\PtsHost\PtsCache.cs (2)
290GC.WaitForPendingFinalizers(); 458GC.SuppressFinalize(_contextPool[index].TextPenaltyModule);
MS\Internal\PtsHost\PtsPage.cs (1)
65GC.SuppressFinalize(this);
MS\Internal\PtsHost\StructuralCache.cs (3)
689GC.SuppressFinalize(this); 827GC.SuppressFinalize(this); 879GC.SuppressFinalize(this);
MS\Internal\PtsHost\SubpageParaClient.cs (1)
53GC.SuppressFinalize(this);
MS\Internal\PtsHost\SubpageParagraph.cs (1)
49GC.SuppressFinalize(this);
MS\Internal\PtsHost\UnmanagedHandle.cs (1)
44GC.SuppressFinalize(this);
MS\Internal\Text\Line.cs (1)
40GC.SuppressFinalize(this);
MS\Internal\Utility\MonitorWrapper.cs (1)
58GC.SuppressFinalize(this);
MS\Internal\WeakHashtable.cs (1)
91long globalMem = GC.GetTotalMemory(false);
MS\Internal\WeakObjectHashtable.cs (1)
89long globalMem = GC.GetTotalMemory(false);
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (1)
101GC.SuppressFinalize(this);
System\Windows\Annotations\Storage\AnnotationStore.cs (1)
121GC.SuppressFinalize(this);
System\Windows\Controls\DataGrid.cs (1)
5271GC.SuppressFinalize(this);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (2)
63GC.SuppressFinalize(this); 146GC.SuppressFinalize(this);
System\Windows\Controls\ItemCollection.cs (1)
2508GC.SuppressFinalize(this);
System\Windows\Controls\ItemContainerGenerator.cs (2)
1474GC.SuppressFinalize(this); 1592GC.SuppressFinalize(this);
System\Windows\Controls\ListBox.cs (1)
898GC.KeepAlive(anchorInfo);
System\Windows\Controls\TextAdaptor.cs (1)
63GC.SuppressFinalize(this);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
251GC.SuppressFinalize(this);
System\Windows\Data\BindingExpression.cs (5)
552GC.KeepAlive(target); // keep target alive during activation (bug 956831) 840GC.KeepAlive(target); // keep target alive during activation (bug 956831) 1029GC.KeepAlive(target); // keep target alive during activation (bug 956831) 1512GC.KeepAlive(target); // keep target alive during transfer (bug 956831) 2664GC.SuppressFinalize(this);
System\Windows\Data\CollectionView.cs (2)
2074GC.SuppressFinalize(this); 2096GC.SuppressFinalize(this);
System\Windows\Data\CollectionViewSource.cs (1)
1215GC.SuppressFinalize(this);
System\Windows\Documents\MsSpellCheckLib\SpellChecker\SpellChecker.cs (1)
628GC.SuppressFinalize(this);
System\Windows\Documents\NaturalLanguageHyphenator.cs (1)
61GC.SuppressFinalize(this);
System\Windows\Documents\NLGSpellerInterop.cs (3)
107GC.SuppressFinalize(this); 736GC.SuppressFinalize(this); 891GC.SuppressFinalize(this);
System\windows\Documents\TextEditor.cs (2)
101GC.SuppressFinalize(this); 236GC.SuppressFinalize(this);
System\windows\Documents\TextEditorContextMenu.cs (3)
553GC.SuppressFinalize(this); 561GC.SuppressFinalize(this); 657GC.SuppressFinalize(this);
System\Windows\Documents\TextElementEnumerator.cs (1)
54GC.SuppressFinalize(this);
System\Windows\Documents\TextRange.cs (1)
1850GC.SuppressFinalize(this);
System\Windows\Documents\TextStore.cs (1)
4261GC.SuppressFinalize(this);
System\Windows\Documents\WinEventHandler.cs (1)
58GC.SuppressFinalize(this);
System\Windows\Documents\WinRTSpellerInterop.cs (1)
96GC.SuppressFinalize(this);
System\Windows\Interop\HwndHost.cs (1)
58GC.SuppressFinalize(this);
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
167GC.SuppressFinalize(this);
System\Windows\Standard\MessageWindow.cs (2)
92GC.SuppressFinalize(this); 175GC.SuppressFinalize(hwndWrapper);
PresentationUI (5)
MS\Internal\Documents\Application\Document.cs (1)
124GC.SuppressFinalize(this);
MS\Internal\Documents\Application\DocumentStream.cs (1)
654GC.SuppressFinalize(this);
MS\Internal\Documents\Application\RightsController.cs (1)
428GC.SuppressFinalize(this);
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
481GC.SuppressFinalize(this);
MS\Internal\Documents\RightsManagementProvider.cs (1)
980GC.SuppressFinalize(this);
ReachFramework (9)
Packaging\PartEditor.cs (1)
105GC.SuppressFinalize(this);
Packaging\XpsDocument.cs (1)
674GC.SuppressFinalize(this);
Packaging\XpsManager.cs (1)
900GC.SuppressFinalize(this);
Packaging\XpsResource.cs (1)
164GC.SuppressFinalize(this);
PrintConfig\PTManager.cs (1)
437GC.SuppressFinalize(this);
PrintConfig\PTProviderBase.cs (1)
121GC.SuppressFinalize(this);
Serialization\Manager\MetroSerializationManager.cs (1)
77GC.SuppressFinalize(this);
Serialization\Manager\ReachSerializer.cs (1)
394GC.SuppressFinalize(this);
Serialization\Manager\XpsPackagingPolicy.cs (1)
486GC.SuppressFinalize(this);
Roslyn.Test.PdbUtilities (1)
Shared\DummyMetadataImport.cs (1)
33GC.SuppressFinalize(this);
Roslyn.VisualStudio.DiagnosticsWindow (3)
OptionPages\ForceLowMemoryMode.cs (3)
149GC.Collect(GC.MaxGeneration); 150GC.WaitForPendingFinalizers();
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionAssetCacheTests.cs (1)
26GC.Collect();
ScenarioTests.Common.Tests (1)
ScenarioTestTypes.cs (1)
1234GC.SuppressFinalize(this);
System.CodeDom (1)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
47GC.SuppressFinalize(this);
System.Collections.Concurrent (1)
System\Collections\Concurrent\BlockingCollection.cs (1)
1493GC.SuppressFinalize(this);
System.Collections.Immutable (1)
System\Collections\Frozen\String\LengthBuckets.cs (1)
92int[] copy = GC.AllocateUninitializedArray<int>(arraySize);
System.ComponentModel.Composition (8)
System\ComponentModel\Composition\Hosting\AggregateExportProvider.cs (1)
93GC.SuppressFinalize(this);
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (1)
132GC.SuppressFinalize(this);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (1)
205GC.SuppressFinalize(this);
System\ComponentModel\Composition\Hosting\ComposablePartCatalogCollection.cs (1)
251GC.SuppressFinalize(this);
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (1)
56GC.SuppressFinalize(this);
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (1)
299GC.SuppressFinalize(this);
System\ComponentModel\Composition\Hosting\ImportEngine.cs (1)
249GC.SuppressFinalize(this);
System\ComponentModel\Composition\Primitives\ComposablePartCatalog.cs (1)
131GC.SuppressFinalize(this);
System.ComponentModel.EventBasedAsync (1)
System\ComponentModel\AsyncOperation.cs (1)
87GC.SuppressFinalize(this);
System.ComponentModel.Primitives (1)
System\ComponentModel\Component.cs (1)
74GC.SuppressFinalize(this);
System.ComponentModel.TypeConverter (7)
System\ComponentModel\Container.cs (1)
109GC.SuppressFinalize(this);
System\ComponentModel\Design\DesignerTransaction.cs (3)
32GC.SuppressFinalize(this); 48GC.SuppressFinalize(this); 81GC.SuppressFinalize(this);
System\ComponentModel\LicFileLicenseProvider.cs (1)
120GC.SuppressFinalize(this);
System\ComponentModel\MarshalByValueComponent.cs (1)
66GC.SuppressFinalize(this);
System\ComponentModel\WeakHashtable.cs (1)
62long globalMem = GC.GetTotalMemory(false);
System.Configuration.ConfigurationManager (1)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
47GC.SuppressFinalize(this);
System.Data.Common (10)
System\Data\Common\DataAdapter.cs (1)
43GC.SuppressFinalize(this);
System\Data\Common\DbDataSource.cs (2)
78GC.SuppressFinalize(this); 86GC.SuppressFinalize(this);
System\Data\DataColumn.cs (1)
126GC.SuppressFinalize(this);
System\Data\DataSet.cs (1)
92GC.SuppressFinalize(this);
System\Data\DataTable.cs (1)
166GC.SuppressFinalize(this);
System\Data\DataView.cs (3)
99GC.SuppressFinalize(this); 132GC.SuppressFinalize(this); 165GC.SuppressFinalize(this);
System\Data\DataViewManager.cs (1)
31GC.SuppressFinalize(this);
System.Data.Odbc (7)
src\libraries\Common\src\System\Runtime\InteropServices\HandleRefMarshaller.cs (1)
22public void OnInvoked() => GC.KeepAlive(_handle.Wrapper);
System\Data\Odbc\OdbcCommand.cs (1)
46GC.SuppressFinalize(this);
System\Data\Odbc\OdbcCommandBuilder.cs (1)
14GC.SuppressFinalize(this);
System\Data\Odbc\OdbcConnection.cs (1)
891GC.KeepAlive(this);
System\Data\Odbc\OdbcConnectionHelper.cs (1)
23GC.SuppressFinalize(this);
System\Data\Odbc\OdbcDataAdapter.cs (2)
20GC.SuppressFinalize(this); 41GC.SuppressFinalize(this);
System.Diagnostics.DiagnosticSource (13)
System\Diagnostics\Activity.cs (1)
1118GC.SuppressFinalize(this);
System\Diagnostics\ActivitySource.cs (1)
75GC.KeepAlive(DiagnosticSourceEventSource.Log);
System\Diagnostics\DiagnosticListener.cs (2)
147GC.KeepAlive(DiagnosticSourceEventSource.Log); 326GC.KeepAlive("");
System\Diagnostics\Metrics\Meter.cs (1)
99GC.KeepAlive(MetricsEventSource.Log);
System\Diagnostics\Metrics\RuntimeMetrics.cs (8)
21private static readonly int s_maxGenerations = Math.Min(GC.GetGCMemoryInfo().GenerationInfo.Length, s_genNames.Length); 46() => GC.GetTotalAllocatedBytes(), 52() => GC.GetGCMemoryInfo().TotalCommittedBytes, 70() => GC.GetTotalPauseDuration().TotalSeconds, 163for (int gen = GC.MaxGeneration; gen >= 0; --gen) 165long collectionsFromThisGeneration = GC.CollectionCount(gen); 187GCMemoryInfo gcInfo = GC.GetGCMemoryInfo(); 197GCMemoryInfo gcInfo = GC.GetGCMemoryInfo();
System.Diagnostics.Process (3)
System\Diagnostics\Process.cs (2)
101GC.SuppressFinalize(this); 111GC.SuppressFinalize(this);
System\Diagnostics\ProcessWaitState.Unix.cs (1)
76GC.SuppressFinalize(this);
System.Diagnostics.TraceSource (5)
System\Diagnostics\Switch.cs (2)
76if (s_LastCollectionCount != GC.CollectionCount(2)) 92s_LastCollectionCount = GC.CollectionCount(2);
System\Diagnostics\TraceListener.cs (1)
67GC.SuppressFinalize(this);
System\Diagnostics\TraceSource.cs (2)
47if (s_LastCollectionCount != GC.CollectionCount(2)) 63s_LastCollectionCount = GC.CollectionCount(2);
System.Drawing.Common (500)
System\Drawing\Bitmap.cs (12)
95GC.KeepAlive(g); 183GC.KeepAlive(this); 207GC.KeepAlive(this); 281GC.KeepAlive(this); 294GC.KeepAlive(this); 311GC.KeepAlive(this); 333GC.KeepAlive(this); 339GC.KeepAlive(this); 361GC.KeepAlive(this); 382GC.KeepAlive(this); 383GC.KeepAlive(effect); 478GC.KeepAlive(this);
System\Drawing\Brush.cs (1)
24GC.SuppressFinalize(this);
System\Drawing\BufferedGraphics.cs (1)
102GC.KeepAlive(refTargetDC.Wrapper);
System\Drawing\BufferedGraphicsContext.cs (4)
173GC.SuppressFinalize(this); 334GC.KeepAlive(this); 436GC.KeepAlive(this); 452GC.KeepAlive(this);
System\Drawing\Drawing2D\AdjustableArrowCap.cs (8)
27GC.KeepAlive(this); 33GC.KeepAlive(this); 43GC.KeepAlive(this); 49GC.KeepAlive(this); 59GC.KeepAlive(this); 65GC.KeepAlive(this); 75GC.KeepAlive(this); 81GC.KeepAlive(this);
System\Drawing\Drawing2D\CustomLineCap.cs (12)
67GC.SuppressFinalize(this); 95GC.KeepAlive(this); 102GC.KeepAlive(this); 111GC.KeepAlive(this); 121GC.KeepAlive(this); 127GC.KeepAlive(this); 137GC.KeepAlive(this); 143GC.KeepAlive(this); 153GC.KeepAlive(this); 159GC.KeepAlive(this); 169GC.KeepAlive(this); 175GC.KeepAlive(this);
System\Drawing\Drawing2D\GraphicsPath.cs (56)
97GC.KeepAlive(this); 112GC.SuppressFinalize(this); 145GC.KeepAlive(this); 154GC.KeepAlive(this); 163GC.KeepAlive(this); 193GC.KeepAlive(this); 203GC.KeepAlive(this); 209GC.KeepAlive(this); 215GC.KeepAlive(this); 221GC.KeepAlive(this); 227GC.KeepAlive(this); 233GC.KeepAlive(this); 240GC.KeepAlive(this); 257GC.KeepAlive(this); 258GC.KeepAlive(graphics); 287GC.KeepAlive(this); 288GC.KeepAlive(pen); 289GC.KeepAlive(graphics); 308GC.KeepAlive(this); 342GC.KeepAlive(this); 369GC.KeepAlive(this); 379GC.KeepAlive(this); 394GC.KeepAlive(this); 414GC.KeepAlive(this); 441GC.KeepAlive(this); 477GC.KeepAlive(this); 502GC.KeepAlive(this); 525GC.KeepAlive(this); 550GC.KeepAlive(this); 576GC.KeepAlive(this); 606GC.KeepAlive(this); 615GC.KeepAlive(this); 635GC.KeepAlive(this); 655GC.KeepAlive(this); 706GC.KeepAlive(this); 724GC.KeepAlive(this); 744GC.KeepAlive(this); 765GC.KeepAlive(this); 773GC.KeepAlive(addingPath); 774GC.KeepAlive(this); 800GC.KeepAlive(family); 801GC.KeepAlive(format); 802GC.KeepAlive(this); 812GC.KeepAlive(matrix); 813GC.KeepAlive(this); 829GC.KeepAlive(this); 830GC.KeepAlive(matrix); 831GC.KeepAlive(pen); 842GC.KeepAlive(this); 859GC.KeepAlive(pen); 860GC.KeepAlive(matrix); 861GC.KeepAlive(this); 920GC.KeepAlive(this); 930GC.KeepAlive(this); 975GC.KeepAlive(this); 1020GC.KeepAlive(this);
System\Drawing\Drawing2D\GraphicsPathIterator.cs (13)
15GC.KeepAlive(path); 22GC.SuppressFinalize(this); 66GC.KeepAlive(this); 77GC.KeepAlive(this); 89GC.KeepAlive(this); 101GC.KeepAlive(this); 110GC.KeepAlive(this); 120GC.KeepAlive(this); 131GC.KeepAlive(this); 140GC.KeepAlive(this); 147GC.KeepAlive(this); 184GC.KeepAlive(this); 233GC.KeepAlive(this);
System\Drawing\Drawing2D\HatchBrush.cs (4)
35GC.KeepAlive(this); 45GC.KeepAlive(this); 56GC.KeepAlive(this); 67GC.KeepAlive(this);
System\Drawing\Drawing2D\LinearGradientBrush.cs (23)
99GC.KeepAlive(this); 109GC.KeepAlive(this); 120GC.KeepAlive(this); 130GC.KeepAlive(this); 141GC.KeepAlive(this); 147GC.KeepAlive(this); 163GC.KeepAlive(this); 175GC.KeepAlive(this); 191GC.KeepAlive(this); 201GC.KeepAlive(this); 210GC.KeepAlive(this); 239GC.KeepAlive(this); 261GC.KeepAlive(this); 272GC.KeepAlive(this); 281GC.KeepAlive(this); 291GC.KeepAlive(this); 298GC.KeepAlive(value); 299GC.KeepAlive(this); 306GC.KeepAlive(this); 316GC.KeepAlive(this); 324GC.KeepAlive(this); 332GC.KeepAlive(this); 340GC.KeepAlive(this);
System\Drawing\Drawing2D\Matrix.cs (23)
82GC.SuppressFinalize(this); 104GC.KeepAlive(this); 127GC.KeepAlive(this); 141GC.KeepAlive(this); 152GC.KeepAlive(this); 177GC.KeepAlive(this); 190GC.KeepAlive(this); 191GC.KeepAlive(matrix); 199GC.KeepAlive(this); 207GC.KeepAlive(this); 215GC.KeepAlive(this); 236GC.KeepAlive(this); 242GC.KeepAlive(this); 248GC.KeepAlive(this); 254GC.KeepAlive(this); 280GC.KeepAlive(this); 309GC.KeepAlive(this); 338GC.KeepAlive(this); 372GC.KeepAlive(this); 381GC.KeepAlive(this); 392GC.KeepAlive(this); 408GC.KeepAlive(this); 409GC.KeepAlive(matrix2);
System\Drawing\Drawing2D\PathGradientBrush.cs (27)
117GC.KeepAlive(this); 127GC.KeepAlive(this); 133GC.KeepAlive(this); 150GC.KeepAlive(this); 166GC.KeepAlive(this); 177GC.KeepAlive(this); 183GC.KeepAlive(this); 193GC.KeepAlive(this); 223GC.KeepAlive(this); 240GC.KeepAlive(this); 250GC.KeepAlive(this); 258GC.KeepAlive(this); 288GC.KeepAlive(this); 307GC.KeepAlive(this); 318GC.KeepAlive(this); 325GC.KeepAlive(value); 326GC.KeepAlive(this); 333GC.KeepAlive(this); 346GC.KeepAlive(matrix); 347GC.KeepAlive(this); 355GC.KeepAlive(this); 363GC.KeepAlive(this); 371GC.KeepAlive(this); 381GC.KeepAlive(this); 387GC.KeepAlive(this); 397GC.KeepAlive(this); 406GC.KeepAlive(this);
System\Drawing\Font.cs (10)
171GC.SuppressFinalize(this); 211GC.KeepAlive(this); 212GC.KeepAlive(graphics); 220GC.KeepAlive(this); 312GC.KeepAlive(this); 313GC.KeepAlive(graphics); 346GC.KeepAlive(this); 542GC.KeepAlive(this); 679GC.KeepAlive(this); 692GC.SuppressFinalize(_fontFamily);
System\Drawing\FontFamily.cs (9)
33GC.SuppressFinalize(this); 126GC.SuppressFinalize(this); 129GC.KeepAlive(fontCollection); 200GC.SuppressFinalize(this); 292GC.KeepAlive(this); 303GC.KeepAlive(this); 314GC.KeepAlive(this); 325GC.KeepAlive(this); 337GC.KeepAlive(this);
System\Drawing\Graphics.cs (99)
137GC.KeepAlive(image); 155GC.SuppressFinalize(this); 435GC.KeepAlive(value); 523GC.KeepAlive(g); 541GC.KeepAlive(path); 548GC.KeepAlive(region); 563GC.KeepAlive(region); 576GC.KeepAlive(region); 628GC.KeepAlive(matrix); 660GC.KeepAlive(pen); 693GC.KeepAlive(pen); 746GC.KeepAlive(pen); 773GC.KeepAlive(pen); 798GC.KeepAlive(pen); 813GC.KeepAlive(pen); 839GC.KeepAlive(pen); 872GC.KeepAlive(pen); 897GC.KeepAlive(pen); 910GC.KeepAlive(pen); 911GC.KeepAlive(path); 932GC.KeepAlive(pen); 958GC.KeepAlive(pen); 996GC.KeepAlive(pen); 1017GC.KeepAlive(pen); 1043GC.KeepAlive(pen); 1078GC.KeepAlive(pen); 1103GC.KeepAlive(pen); 1135GC.KeepAlive(pen); 1159GC.KeepAlive(pen); 1186GC.KeepAlive(pen); 1230GC.KeepAlive(brush); 1269GC.KeepAlive(brush); 1291GC.KeepAlive(brush); 1325GC.KeepAlive(brush); 1364GC.KeepAlive(brush); 1384GC.KeepAlive(brush); 1435GC.KeepAlive(brush); 1466GC.KeepAlive(brush); 1509GC.KeepAlive(brush); 1534GC.KeepAlive(brush); 1572GC.KeepAlive(brush); 1756GC.KeepAlive(font); 1757GC.KeepAlive(brush); 1758GC.KeepAlive(format); 1820GC.KeepAlive(font); 1821GC.KeepAlive(stringFormat); 1987GC.KeepAlive(stringFormat); 1988GC.KeepAlive(font); 2194GC.KeepAlive(imageAttr); 2195GC.KeepAlive(callback); 2247GC.KeepAlive(imageAttr); 2248GC.KeepAlive(callback); 2309GC.KeepAlive(imageAttrs); 2310GC.KeepAlive(callback); 2380GC.KeepAlive(pen); 2409GC.KeepAlive(pen); 2427GC.KeepAlive(pen); 2648GC.KeepAlive(image); 2785GC.KeepAlive(pen); 2810GC.KeepAlive(pen); 2842GC.KeepAlive(pen); 2858GC.KeepAlive(brush); 2859GC.KeepAlive(path); 2875GC.KeepAlive(brush); 2876GC.KeepAlive(region); 2955GC.KeepAlive(imageAttr); 2956GC.KeepAlive(metafile); 2957GC.KeepAlive(this); 2984GC.KeepAlive(imageAttr); 2985GC.KeepAlive(metafile); 2986GC.KeepAlive(this); 3019GC.KeepAlive(imageAttr); 3020GC.KeepAlive(metafile); 3021GC.KeepAlive(this); 3048GC.KeepAlive(imageAttr); 3049GC.KeepAlive(metafile); 3050GC.KeepAlive(this); 3074GC.KeepAlive(imageAttr); 3075GC.KeepAlive(metafile); 3076GC.KeepAlive(this); 3115GC.KeepAlive(imageAttr); 3116GC.KeepAlive(metafile); 3117GC.KeepAlive(this); 3156GC.KeepAlive(imageAttr); 3157GC.KeepAlive(metafile); 3158GC.KeepAlive(this); 3189GC.KeepAlive(imageAttr); 3190GC.KeepAlive(metafile); 3191GC.KeepAlive(this); 3443GC.KeepAlive(this); 3470GC.KeepAlive(this); 3489GC.KeepAlive(this); 3571GC.KeepAlive(this); 3608GC.KeepAlive(cachedBitmap); 3644GC.KeepAlive(effect); 3645GC.KeepAlive(imageAttr); 3646GC.KeepAlive(image); 3647GC.KeepAlive(this); 3654GC.KeepAlive(this);
System\Drawing\Graphics.EnumerateMetafileDataAdapter.cs (2)
43GC.KeepAlive(_callback); 44GC.KeepAlive(_nativeCallback);
System\Drawing\GraphicsContext.cs (1)
31GC.SuppressFinalize(this);
System\Drawing\Icon.cs (3)
254GC.KeepAlive(this); 265GC.SuppressFinalize(this); 584GC.KeepAlive(this); // finalizer mustn't deallocate data blobs while this method is running
System\Drawing\Image.cs (31)
186GC.SuppressFinalize(this); 202GC.KeepAlive(this); 285GC.KeepAlive(this); 286GC.KeepAlive(encoderParams); 326GC.KeepAlive(this); 327GC.KeepAlive(encoderParams); 355GC.KeepAlive(this); 356GC.KeepAlive(encoderParams); 387GC.KeepAlive(this); 388GC.KeepAlive(image); 389GC.KeepAlive(encoderParams); 413GC.KeepAlive(this); 435GC.KeepAlive(this); 452GC.KeepAlive(this); 466GC.KeepAlive(this); 480GC.KeepAlive(this); 495GC.KeepAlive(this); 509GC.KeepAlive(this); 540GC.KeepAlive(this); 574GC.KeepAlive(this); 608GC.KeepAlive(this); 618GC.KeepAlive(this); 642GC.KeepAlive(this); 667GC.KeepAlive(this); 689GC.KeepAlive(this); 701GC.KeepAlive(this); 721GC.KeepAlive(this); 728GC.KeepAlive(this); 737GC.KeepAlive(this); 765GC.KeepAlive(this); 839GC.KeepAlive(this);
System\Drawing\Imaging\CachedBitmap.cs (1)
79GC.SuppressFinalize(this);
System\Drawing\Imaging\ColorPalette.cs (1)
114GC.KeepAlive(bitmap);
System\Drawing\Imaging\Effects\ColorMatrixEffect.cs (1)
30GC.KeepAlive(this);
System\Drawing\Imaging\Effects\Effect.cs (2)
27GC.SuppressFinalize(this); 35GC.KeepAlive(this);
System\Drawing\Imaging\EncoderParameter.cs (19)
57GC.KeepAlive(this); 58GC.SuppressFinalize(this); 72GC.KeepAlive(this); 87GC.KeepAlive(this); 99GC.KeepAlive(this); 111GC.KeepAlive(this); 124GC.KeepAlive(this); 137GC.KeepAlive(this); 157GC.KeepAlive(this); 167GC.KeepAlive(this); 180GC.KeepAlive(this); 193GC.KeepAlive(this); 205GC.KeepAlive(this); 222GC.KeepAlive(this); 242GC.KeepAlive(this); 262GC.KeepAlive(this); 291GC.KeepAlive(this); 317GC.KeepAlive(this); 343GC.KeepAlive(this);
System\Drawing\Imaging\ImageAttributes.cs (16)
78GC.SuppressFinalize(this); 93GC.KeepAlive(this); 134GC.KeepAlive(this); 182GC.KeepAlive(this); 201GC.KeepAlive(this); 220GC.KeepAlive(this); 238GC.KeepAlive(this); 260GC.KeepAlive(this); 281GC.KeepAlive(this); 301GC.KeepAlive(this); 314GC.KeepAlive(this); 378GC.KeepAlive(this); 403GC.KeepAlive(this); 424GC.KeepAlive(this); 451GC.KeepAlive(this); 465GC.KeepAlive(this);
System\Drawing\Imaging\Metafile.cs (2)
548GC.KeepAlive(this); 625GC.KeepAlive(this);
System\Drawing\Pen.cs (48)
72GC.KeepAlive(brush); 92GC.KeepAlive(this); 102GC.SuppressFinalize(this); 141GC.KeepAlive(this); 152GC.KeepAlive(this); 172GC.KeepAlive(this); 184GC.KeepAlive(this); 213GC.KeepAlive(this); 226GC.KeepAlive(this); 255GC.KeepAlive(this); 268GC.KeepAlive(this); 279GC.KeepAlive(value); 280GC.KeepAlive(this); 293GC.KeepAlive(this); 304GC.KeepAlive(value); 305GC.KeepAlive(this); 318GC.KeepAlive(this); 334GC.KeepAlive(this); 347GC.KeepAlive(this); 363GC.KeepAlive(this); 376GC.KeepAlive(this); 387GC.KeepAlive(this); 400GC.KeepAlive(this); 416GC.KeepAlive(this); 429GC.KeepAlive(this); 442GC.KeepAlive(value); 443GC.KeepAlive(this); 453GC.KeepAlive(this); 475GC.KeepAlive(matrix); 476GC.KeepAlive(this); 491GC.KeepAlive(this); 505GC.KeepAlive(this); 519GC.KeepAlive(this); 525GC.KeepAlive(this); 538GC.KeepAlive(this); 559GC.KeepAlive(this); 635GC.KeepAlive(this); 643GC.KeepAlive(this); 656GC.KeepAlive(this); 672GC.KeepAlive(this); 696GC.KeepAlive(this); 714GC.KeepAlive(this); 725GC.KeepAlive(this); 738GC.KeepAlive(this); 767GC.KeepAlive(this); 785GC.KeepAlive(this); 809GC.KeepAlive(this); 824GC.KeepAlive(this);
System\Drawing\Region.cs (23)
39GC.KeepAlive(path); 88GC.KeepAlive(this); 100GC.SuppressFinalize(this); 118GC.KeepAlive(path); 125GC.KeepAlive(region); 137GC.KeepAlive(path); 144GC.KeepAlive(region); 156GC.KeepAlive(path); 163GC.KeepAlive(region); 175GC.KeepAlive(path); 182GC.KeepAlive(region); 194GC.KeepAlive(path); 201GC.KeepAlive(region); 213GC.KeepAlive(matrix); 221GC.KeepAlive(g); 230GC.KeepAlive(g); 239GC.KeepAlive(g); 257GC.KeepAlive(g); 258GC.KeepAlive(region); 295GC.KeepAlive(g); 314GC.KeepAlive(g); 358GC.KeepAlive(matrix); 365GC.KeepAlive(this);
System\Drawing\SolidBrush.cs (3)
40GC.KeepAlive(this); 68GC.KeepAlive(this); 101GC.KeepAlive(this);
System\Drawing\StringFormat.cs (19)
54GC.KeepAlive(format); 63GC.SuppressFinalize(this); 110GC.KeepAlive(this); 116GC.KeepAlive(this); 138GC.KeepAlive(this); 150GC.KeepAlive(this); 161GC.KeepAlive(this); 174GC.KeepAlive(this); 185GC.KeepAlive(this); 198GC.KeepAlive(this); 209GC.KeepAlive(this); 235GC.KeepAlive(this); 259GC.KeepAlive(this); 276GC.KeepAlive(this); 287GC.KeepAlive(this); 349GC.KeepAlive(this); 365GC.KeepAlive(this); 379GC.KeepAlive(this); 388GC.KeepAlive(this);
System\Drawing\Text\FontCollection.cs (2)
22GC.SuppressFinalize(this); 59GC.KeepAlive(this);
System\Drawing\Text\InstalledFontCollection.cs (1)
16GC.SuppressFinalize(this);
System\Drawing\Text\PrivateFontCollection.cs (2)
61GC.KeepAlive(this); 74GC.KeepAlive(this);
System\Drawing\TextureBrush.cs (16)
32GC.KeepAlive(image); 51GC.KeepAlive(image); 77GC.KeepAlive(image); 78GC.KeepAlive(imageAttr); 98GC.KeepAlive(this); 109GC.KeepAlive(this); 116GC.KeepAlive(this); 126GC.KeepAlive(this); 137GC.KeepAlive(this); 147GC.KeepAlive(this); 155GC.KeepAlive(this); 174GC.KeepAlive(this); 175GC.KeepAlive(matrix); 187GC.KeepAlive(this); 199GC.KeepAlive(this); 211GC.KeepAlive(this);
Windows\Win32\PInvoke.AbortDoc.cs (1)
12GC.KeepAlive(hdc.Wrapper);
Windows\Win32\PInvoke.EndDoc.cs (1)
12GC.KeepAlive(hdc.Wrapper);
Windows\Win32\PInvoke.EndPage.cs (1)
12GC.KeepAlive(hdc.Wrapper);
Windows\Win32\PInvoke.StartDoc.cs (1)
14GC.KeepAlive(hdc.Wrapper);
Windows\Win32\PInvoke.StartPage.cs (1)
12GC.KeepAlive(hdc.Wrapper);
System.Drawing.Common.Tests (2)
System\Drawing\BufferedGraphicsContextTests.cs (2)
221GC.Collect(); 222GC.WaitForPendingFinalizers();
System.IO.Compression (2)
System\IO\Compression\DeflateZLib\Deflater.cs (1)
72GC.SuppressFinalize(this);
System\IO\Compression\DeflateZLib\Inflater.cs (1)
221GC.SuppressFinalize(this);
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (1)
69GC.SuppressFinalize(this);
System.IO.MemoryMappedFiles (2)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (1)
457GC.SuppressFinalize(this);
System\IO\MemoryMappedFiles\MemoryMappedView.cs (1)
53GC.SuppressFinalize(this);
System.IO.Packaging (2)
System\IO\Packaging\Package.cs (1)
510GC.SuppressFinalize(this);
System\IO\Packaging\PackageProperties.cs (1)
45GC.SuppressFinalize(this);
System.IO.Pipes (1)
System\IO\Pipes\AnonymousPipeServerStream.cs (1)
89GC.SuppressFinalize(_clientHandle);
System.Linq (2)
System\Linq\SegmentedArrayBuilder.cs (2)
244result = GC.AllocateUninitializedArray<T>(count); 285result = GC.AllocateUninitializedArray<T>(count);
System.Memory (1)
System\Buffers\MemoryPool.cs (1)
42GC.SuppressFinalize(this);
System.Net.Http (9)
System\Net\Http\HttpContent.cs (1)
652GC.SuppressFinalize(this);
System\Net\Http\HttpMessageHandler.cs (1)
39GC.SuppressFinalize(this);
System\Net\Http\HttpMessageInvoker.cs (1)
117GC.SuppressFinalize(this);
System\Net\Http\HttpRequestMessage.cs (1)
208GC.SuppressFinalize(this);
System\Net\Http\HttpResponseMessage.cs (1)
224GC.SuppressFinalize(this);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1857GC.SuppressFinalize(this);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
113GC.SuppressFinalize(this);
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (2)
173GC.SuppressFinalize(cleanup); 219GC.SuppressFinalize(this);
System.Net.HttpListener (1)
System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs (1)
124GC.SuppressFinalize(this);
System.Net.Mail (1)
System\Net\Mail\SmtpClient.cs (1)
1001GC.SuppressFinalize(this);
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
41GC.SuppressFinalize(this);
System.Net.Quic (1)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (1)
33GC.SuppressFinalize(newHandle);
System.Net.Requests (1)
System\Net\WebResponse.cs (1)
53GC.SuppressFinalize(this);
System.Net.Security (8)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (1)
33GC.SuppressFinalize(newHandle);
src\libraries\Common\src\System\Net\Security\SafeCredentialReference.cs (1)
40GC.SuppressFinalize(this);
System\Net\Security\AuthenticatedStream.cs (1)
76GC.SuppressFinalize(this);
System\Net\Security\SslStream.IO.cs (1)
74GC.SuppressFinalize(this);
System\Net\Security\SslStreamCertificateContext.Linux.cs (4)
356GC.KeepAlive(TargetCertificate); 357GC.KeepAlive(_privateIntermediateCertificates); 358GC.KeepAlive(_rootCertificate); 359GC.KeepAlive(caCert);
System.Net.Sockets (5)
System\Net\Sockets\Socket.cs (2)
232GC.SuppressFinalize(this); 3530GC.SuppressFinalize(this);
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
516GC.SuppressFinalize(this);
System\Net\Sockets\TCPClient.cs (1)
296GC.SuppressFinalize(this);
System\Net\Sockets\UDPClient.cs (1)
245GC.SuppressFinalize(this);
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
62GC.SuppressFinalize(this);
System.Numerics.Tensors (5)
System\Numerics\Tensors\netcore\Tensor.cs (3)
438T[] array = GC.AllocateUninitializedArray<T>(checked((int)(shape.LinearLength)), pinned); 446T[] values = GC.AllocateUninitializedArray<T>(checked((int)(shape.LinearLength)), pinned); 1666T[] values = tensor.IsPinned ? GC.AllocateArray<T>((int)newSize) : (new T[newSize]);
System\Numerics\Tensors\netcore\Tensor_1.cs (2)
34_values = GC.AllocateArray<T>(checked((int)(_shape.LinearLength)), pinned); 43_values = GC.AllocateArray<T>(checked((int)(_shape.LinearLength)), pinned);
System.Private.CoreLib (203)
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (2)
213GCMemoryInfo mi = GC.GetGCMemoryInfo(); 218public long MonitoringTotalAllocatedMemorySize => GC.GetTotalAllocatedBytes(precise: false);
src\libraries\System.Private.CoreLib\src\System\Buffers\MemoryManager.cs (1)
65GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
110buffer = GC.AllocateUninitializedArray<T>(minimumLength);
src\libraries\System.Private.CoreLib\src\System\Buffers\Utilities.cs (1)
43GCMemoryInfo memoryInfo = GC.GetGCMemoryInfo();
src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (1)
143GC.SuppressFinalize(newRef);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
2950byte[] result = GC.AllocateUninitializedArray<byte>(chars.Length >> 1);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
125GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
1516GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (15)
89_gcHeapSizeCounter ??= new PollingCounter("gc-heap-size", this, () => ((double)GC.GetTotalMemory(false) / 1_000_000)) { DisplayName = "GC Heap Size", DisplayUnits = "MB" }; 90_gen0GCCounter ??= new IncrementingPollingCounter("gen-0-gc-count", this, () => GC.CollectionCount(0)) { DisplayName = "Gen 0 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) }; 91_gen1GCCounter ??= new IncrementingPollingCounter("gen-1-gc-count", this, () => GC.CollectionCount(1)) { DisplayName = "Gen 1 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) }; 92_gen2GCCounter ??= new IncrementingPollingCounter("gen-2-gc-count", this, () => GC.CollectionCount(2)) { DisplayName = "Gen 2 GC Count", DisplayRateTimeScale = new TimeSpan(0, 1, 0) }; 93_gen0BudgetCounter ??= new PollingCounter("gen-0-gc-budget", this, () => GC.GetGenerationBudget(0) / 1_000_000) { DisplayName = "Gen 0 GC Budget", DisplayUnits = "MB" }; 98_allocRateCounter ??= new IncrementingPollingCounter("alloc-rate", this, () => GC.GetTotalAllocatedBytes()) { DisplayName = "Allocation Rate", DisplayUnits = "B", DisplayRateTimeScale = new TimeSpan(0, 0, 1) }; 101var gcInfo = GC.GetGCMemoryInfo(); 105_committedCounter ??= new PollingCounter("gc-committed", this, () => ((double)GC.GetGCMemoryInfo().TotalCommittedBytes / 1_000_000)) { DisplayName = "GC Committed Bytes", DisplayUnits = "MB" }; 107_gcTimeCounter ??= new PollingCounter("time-in-gc", this, () => GC.GetLastGCPercentTimeInGC()) { DisplayName = "% Time in GC since last GC", DisplayUnits = "%" }; 108_totalGcPauseTimeCounter ??= new IncrementingPollingCounter("total-pause-time-by-gc", this, () => GC.GetTotalPauseDuration().TotalMilliseconds) { DisplayName = "Time paused by GC", DisplayUnits = "ms" }; 109_gen0SizeCounter ??= new PollingCounter("gen-0-size", this, () => GC.GetGenerationSize(0)) { DisplayName = "Gen 0 Size", DisplayUnits = "B" }; 110_gen1SizeCounter ??= new PollingCounter("gen-1-size", this, () => GC.GetGenerationSize(1)) { DisplayName = "Gen 1 Size", DisplayUnits = "B" }; 111_gen2SizeCounter ??= new PollingCounter("gen-2-size", this, () => GC.GetGenerationSize(2)) { DisplayName = "Gen 2 Size", DisplayUnits = "B" }; 112_lohSizeCounter ??= new PollingCounter("loh-size", this, () => GC.GetGenerationSize(3)) { DisplayName = "LOH Size", DisplayUnits = "B" }; 113_pohSizeCounter ??= new PollingCounter("poh-size", this, () => GC.GetGenerationSize(4)) { DisplayName = "POH (Pinned Object Heap) Size", DisplayUnits = "B" };
src\libraries\System.Private.CoreLib\src\System\Gen2GcCallback.cs (1)
109GC.ReRegisterForFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.cs (1)
107GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (2)
57GC.SuppressFinalize(safeHandle); 529GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\Iterator.cs (1)
31GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (1)
573byte[] copy = GC.AllocateUninitializedArray<byte>(count);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (1)
1037Interlocked.CompareExchange(ref _buffer, GC.AllocateUninitializedArray<byte>(_bufferSize), null);
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
164GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (2)
195GC.SuppressFinalize(this); 264GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (2)
30GC.SuppressFinalize(this); 36GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (2)
56GC.SuppressFinalize(this); 66GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (1)
104GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\LocalDataStoreSlot.cs (1)
14GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
417GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CriticalHandle.cs (2)
154GC.SuppressFinalize(this); 197GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\PosixSignalRegistration.cs (1)
51GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (3)
72GC.SuppressFinalize(this); 109GC.SuppressFinalize(this); 132GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (1)
70GC.KeepAlive(errorWriter);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (3)
97GC.SuppressFinalize(this); 427byte[] bytes = GC.AllocateUninitializedArray<byte>((int)length); 466GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (3)
124private static readonly ulong s_GCSegmentSize = GC.GetSegmentSize(); 227GC.Collect(); 301GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (7)
137m_ChunkChars = GC.AllocateUninitializedArray<char>(capacity); 163m_ChunkChars = GC.AllocateUninitializedArray<char>(capacity); 217m_ChunkChars = GC.AllocateUninitializedArray<char>(persistedCapacity); 282char[] newArray = GC.AllocateUninitializedArray<char>(newLen); 423char[] newArray = GC.AllocateUninitializedArray<char>(newLen); 2571char[] chunkChars = GC.AllocateUninitializedArray<char>(newBlockLength); 2711m_ChunkChars = GC.AllocateUninitializedArray<char>(size);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (1)
201_readBuffer = GC.AllocateUninitializedArray<byte>(_thisEncoding.GetMaxByteCount(_readCharBufferMaxSize));
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
514GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLock.cs (1)
53GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (1)
615GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\PeriodicTimer.cs (4)
34GC.SuppressFinalize(this); 53GC.SuppressFinalize(this); 59GC.SuppressFinalize(this); 144GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (1)
476GCMemoryInfo gcMemoryInfo = GC.GetGCMemoryInfo();
src\libraries\System.Private.CoreLib\src\System\Threading\PreAllocatedOverlapped.Portable.cs (1)
30GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (1)
64GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
876GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
1581GC.SuppressFinalize(this); 5372GC.KeepAlive(tasks);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (2)
221GC.ReRegisterForFinalize(this); 237GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (1)
155GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (1)
1484GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (3)
805GC.SuppressFinalize(this); 811GC.SuppressFinalize(this); 818GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
97GC.SuppressFinalize(this);
src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (5)
132GC.KeepAlive(this); 168GC.KeepAlive(this); 178GC.KeepAlive(this); 200GC.KeepAlive(this); 209GC.KeepAlive(this);
src\libraries\System.Private.CoreLib\src\System\WeakReference.T.cs (4)
114GC.KeepAlive(this); 123GC.KeepAlive(this); 147GC.KeepAlive(this); 157GC.KeepAlive(this);
src\System\Array.CoreCLR.cs (2)
506GC.KeepAlive(this); // Keep the method table alive 612GC.KeepAlive(this); // Keep the method table alive
src\System\Delegate.CoreCLR.cs (1)
427GC.KeepAlive(method);
src\System\Enum.CoreCLR.cs (3)
22GC.KeepAlive(rt); 30GC.KeepAlive(this); 72GC.KeepAlive(enumType);
src\System\IO\Stream.CoreCLR.cs (2)
21GC.KeepAlive(this); 35GC.KeepAlive(this);
src\System\Object.CoreCLR.cs (1)
18GC.KeepAlive(this);
src\System\Reflection\Emit\DynamicILGenerator.cs (2)
632GC.ReRegisterForFinalize(this); 655GC.ReRegisterForFinalize(this);
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (2)
55GC.KeepAlive(methodHandle); 142GC.KeepAlive(this);
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (2)
133GC.KeepAlive(method); 143GC.KeepAlive(method);
src\System\Reflection\LoaderAllocator.cs (1)
42GC.ReRegisterForFinalize(this);
src\System\Reflection\RuntimeAssembly.cs (1)
591GC.KeepAlive(this); // We directly pass the native handle above - make sure this object stays alive for the call
src\System\Reflection\RuntimeCustomAttributeData.cs (1)
218GC.KeepAlive(module);
src\System\Reflection\RuntimeParameterInfo.cs (2)
247GC.KeepAlive(this); 348GC.KeepAlive(this);
src\System\Reflection\RuntimePropertyInfo.cs (3)
51GC.KeepAlive(module); 72GC.KeepAlive(this); 215GC.KeepAlive(this);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (6)
49GC.KeepAlive(fldInfo); 121GC.KeepAlive(fldInfo); 216GC.KeepAlive(instantiation); 217GC.KeepAlive(methodInfo); 402GC.KeepAlive(obj); // Keep MethodTable alive 428GC.KeepAlive(array); // Keep MethodTable alive
src\System\Runtime\CompilerServices\VirtualDispatchHelpers.cs (1)
70GC.KeepAlive(obj);
src\System\Runtime\DependentHandle.cs (1)
120/// target in a local and calling <see cref="GC.KeepAlive(object)"/> on it after <see cref="Dependent"/> is accessed.
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (3)
54GC.KeepAlive(rtField); 223GC.KeepAlive(rmi); 321GC.KeepAlive(rt);
src\System\RuntimeHandles.cs (45)
242GC.KeepAlive(genericParameter); 271GC.KeepAlive(genericParameter1); 272GC.KeepAlive(genericParameter2); 295GC.KeepAlive(type); 447GC.KeepAlive(type); 554GC.KeepAlive(type); 574GC.KeepAlive(type); 686GC.KeepAlive(type); 687GC.KeepAlive(target); 720GC.KeepAlive(type); 765GC.KeepAlive(inst); 778GC.KeepAlive(inst); 864GC.KeepAlive(methodContext); 1052GC.KeepAlive(m_value); 1072GC.KeepAlive(method); 1087GC.KeepAlive(methodInfo); 1104GC.KeepAlive(method); 1116GC.KeepAlive(method); 1128GC.KeepAlive(method); 1138GC.KeepAlive(method); 1205GC.KeepAlive(destNullableType); // The obj instance will keep the type alive. 1221GC.KeepAlive(method); 1236GC.KeepAlive(method); 1246GC.KeepAlive(method); 1281GC.KeepAlive(method); 1296GC.KeepAlive(method); 1315GC.KeepAlive(method); 1336GC.KeepAlive(method); 1497GC.KeepAlive(field); 1535GC.KeepAlive(field); 1557GC.KeepAlive(field); 1577GC.KeepAlive(field); 1599GC.KeepAlive(field); 1620GC.KeepAlive(field); 1641GC.KeepAlive(field); 1660GC.KeepAlive(field); 1847GC.KeepAlive(typeInstantiationContext); 1848GC.KeepAlive(methodInstantiationContext); 1888GC.KeepAlive(typeInstantiationContext); 1889GC.KeepAlive(methodInstantiationContext); 1953GC.KeepAlive(typeInstantiationContext); 1954GC.KeepAlive(methodInstantiationContext); 2065GC.KeepAlive(methodHandle); 2072GC.KeepAlive(methodHandle); 2079GC.KeepAlive(fieldHandle);
src\System\RuntimeType.ActivatorCache.cs (1)
136GC.KeepAlive(rt);
src\System\RuntimeType.BoxCache.cs (1)
89GC.KeepAlive(rt);
src\System\RuntimeType.CoreCLR.cs (23)
958GC.KeepAlive(module); 1201GC.KeepAlive(module); 1375GC.KeepAlive(module); 1548GC.KeepAlive(module); 1767GC.KeepAlive(this); 1785GC.KeepAlive(methodHandle); 1917GC.KeepAlive(methodInstantiation); 1971GC.KeepAlive(field); 3295GC.KeepAlive(this); 3379GC.KeepAlive(this); // Ensure TypeHandle remains alive. 3409GC.KeepAlive(this); 3421GC.KeepAlive(this); 3437GC.KeepAlive(this); 3451GC.KeepAlive(this); 3463GC.KeepAlive(this); 3475GC.KeepAlive(this); 3485GC.KeepAlive(this); 3496GC.KeepAlive(this); 3508GC.KeepAlive(this); 3520GC.KeepAlive(this); 3542GC.KeepAlive(module); 3673GC.KeepAlive(this); 3681GC.KeepAlive(this);
src\System\RuntimeType.CreateUninitializedCache.CoreCLR.cs (1)
51GC.KeepAlive(rt);
src\System\StubHelpers.cs (1)
1283GC.KeepAlive(m_obj);
src\System\Threading\Thread.CoreCLR.cs (5)
183GC.KeepAlive(this); 206GC.KeepAlive(this); 217GC.KeepAlive(this); 292GC.KeepAlive(this); 391GC.KeepAlive(this);
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\CollectionDataContract.cs (2)
1601GC.SuppressFinalize(this); 1630GC.SuppressFinalize(this);
System.Private.Windows.Core (54)
System\DisposableBase.cs (1)
41GC.SuppressFinalize(this);
System\DisposalTracking.cs (2)
23GC.SuppressFinalize(@object); 33/// Fires if <see cref="GC.SuppressFinalize(object)"/> is not called on the class and the class is finalized.
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
150byte[] bytes = GC.AllocateUninitializedArray<byte>(size);
System\Private\Windows\Ole\DragDropFormat.cs (1)
127GC.SuppressFinalize(this);
Windows\Win32\Foundation\HandleRef.cs (1)
15/// <see cref="GC.KeepAlive(object?)"/> on the <see cref="Wrapper"/> <see langword="object"/>.
Windows\Win32\Graphics\Gdi\BeginPaintScope.cs (1)
45GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\CreateBitmapScope.cs (1)
50GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\CreateBrushScope.cs (2)
52GC.SuppressFinalize(this); 63GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\CreateDcScope.cs (1)
67GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\CreatePenScope.cs (1)
45GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\HdcHandle.cs (2)
19GC.SuppressFinalize(hdc); 37GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\RegionScope.cs (1)
92GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\SelectObjectScope.cs (1)
53GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\SetBkModeScope.cs (1)
44GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\SetMapModeScope.cs (1)
45GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\SetRop2Scope.cs (1)
44GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\SetTextAlignmentScope.cs (1)
45GC.SuppressFinalize(this);
Windows\Win32\Graphics\Gdi\SetTextColorScope.cs (1)
45GC.SuppressFinalize(this);
Windows\Win32\PInvokeCore.BitBlt.cs (2)
30GC.KeepAlive(hdc.Wrapper); 56GC.KeepAlive(hdcSrc.Wrapper);
Windows\Win32\PInvokeCore.CallWindowProc.cs (1)
18GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.CopyImage.cs (2)
13GC.KeepAlive(hImage.Wrapper); 22GC.KeepAlive(hImage.Wrapper);
Windows\Win32\PInvokeCore.DragAcceptFiles.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.DrawIcon.cs (1)
16GC.KeepAlive(hIcon.Wrapper);
Windows\Win32\PInvokeCore.DrawIconEx.cs (1)
26GC.KeepAlive(hIcon.Wrapper);
Windows\Win32\PInvokeCore.EnumChildWindows.cs (1)
27GC.KeepAlive(hwndParent.Wrapper);
Windows\Win32\PInvokeCore.GetClientRect.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.GetIconInfo.cs (1)
13GC.KeepAlive(icon.Wrapper);
Windows\Win32\PInvokeCore.GetWindowLong.cs (1)
33GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.GetWindowRect.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.GetWindowText.cs (1)
65GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.GetWindowTextLength.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.GetWindowThreadProcessId.cs (1)
15GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.MapWindowPoints.cs (4)
18GC.KeepAlive(hWndFrom.Wrapper); 19GC.KeepAlive(hWndTo.Wrapper); 32GC.KeepAlive(hWndFrom.Wrapper); 33GC.KeepAlive(hWndTo.Wrapper);
Windows\Win32\PInvokeCore.PeekMessage.cs (1)
18GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.PostMessage.cs (1)
17GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvokeCore.RegisterDragDrop.cs (1)
22GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvokeCore.RevokeDragDrop.cs (1)
12GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvokeCore.SendMessage.cs (2)
16GC.KeepAlive(hWnd.Wrapper); 28GC.KeepAlive(wParam.Wrapper);
Windows\Win32\PInvokeCore.SetWindowLong.cs (3)
22GC.KeepAlive(hWnd.Wrapper); 31GC.KeepAlive(newValue.Wrapper); 40GC.KeepAlive(dwNewLong);
Windows\Win32\System\Com\AgileComPointer.cs (4)
74GC.AddMemoryPressure(_memoryPressure); 80GC.SuppressFinalize(this); 174GC.SuppressFinalize(this); 189GC.RemoveMemoryPressure(_memoryPressure);
System.Private.Windows.Core.Tests (3)
System\Value\MemoryWatch.cs (3)
79return new(GC.GetAllocatedBytesForCurrentThread()); 87Assert.Equal(0, GC.GetAllocatedBytesForCurrentThread() - _allocations); 90_allocations = GC.GetAllocatedBytesForCurrentThread();
System.Private.Windows.Core.TestUtilities (3)
FileCleanupTestBase.cs (1)
32GC.SuppressFinalize(this);
NoAssertContext.cs (1)
63GC.SuppressFinalize(this);
TempFile.cs (1)
70GC.SuppressFinalize(this);
System.Private.Windows.GdiPlus (10)
System\Drawing\IIconExtensions.cs (1)
29GC.KeepAlive(icon);
Windows\Win32\Graphics\GdiPlus\GpBitmapExtensions.cs (3)
28GC.KeepAlive(bitmap); 34GC.KeepAlive(bitmap); 47GC.KeepAlive(bitmap);
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (2)
19GC.KeepAlive(image); 29GC.KeepAlive(image);
Windows\Win32\Graphics\GdiPlus\GpMetafileExtensions.cs (1)
14GC.KeepAlive(metafile);
Windows\Win32\Graphics\GdiPlus\GpRegionExtensions.cs (3)
14GC.KeepAlive(region); 15GC.KeepAlive(graphics); 27GC.KeepAlive(region);
System.Private.Xml (2)
System\Xml\Core\XmlWriterAsync.cs (1)
581GC.SuppressFinalize(this);
System\Xml\Dom\XmlElementList.cs (1)
282GC.SuppressFinalize(this);
System.Reflection.Metadata (3)
System\Reflection\Internal\MemoryBlocks\AbstractMemoryBlock.cs (1)
44GC.KeepAlive(this);
System\Reflection\Internal\MemoryBlocks\MemoryBlockProvider.cs (1)
69GC.SuppressFinalize(this);
System\Reflection\Internal\Utilities\CriticalDisposableObject.cs (1)
14GC.SuppressFinalize(this);
System.Reflection.MetadataLoadContext (1)
System\Reflection\MetadataLoadContext.Apis.cs (1)
275GC.SuppressFinalize(this);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
209[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.GC))]
System.Runtime.Caching (10)
System\Runtime\Caching\CacheMemoryMonitor.cs (2)
48_gen2Count = GC.CollectionCount(2); 163int gen2Count = GC.CollectionCount(2);
System\Runtime\Caching\ChangeMonitor.cs (1)
102GC.SuppressFinalize(this);
System\Runtime\Caching\MemoryCache.cs (1)
455GC.SuppressFinalize(this);
System\Runtime\Caching\MemoryCacheStatistics.cs (2)
113int gen2Count = GC.CollectionCount(2); 207int gen2Count = GC.CollectionCount(2);
System\Runtime\Caching\PhysicalMemoryMonitor.Unix.cs (4)
31int ccount = GC.CollectionCount(0); 34GC.Collect(0, GCCollectionMode.Optimized); // A quick, ephemeral Gen 0 collection 35ccount = GC.CollectionCount(0); 40GCMemoryInfo memInfo = GC.GetGCMemoryInfo();
System.Runtime.InteropServices (5)
System\Runtime\InteropServices\HandleCollector.cs (4)
78(_gcCounts[collectionGeneration] == GC.CollectionCount(collectionGeneration)))) 80GC.Collect(collectionGeneration); 87_gcCounts[i] = GC.CollectionCount(i); 118_gcCounts[i] = GC.CollectionCount(i);
System\Runtime\InteropServices\Marshalling\ComObject.cs (1)
88GC.SuppressFinalize(this);
System.Security.Cryptography (30)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (1)
33GC.SuppressFinalize(newHandle);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (1)
82GC.SuppressFinalize(this);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (1)
1612GC.SuppressFinalize(this);
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (1)
91GC.SuppressFinalize(this);
System\Security\Cryptography\AsymmetricAlgorithm.cs (1)
79GC.SuppressFinalize(this);
System\Security\Cryptography\Base64Transforms.cs (2)
95GC.SuppressFinalize(this); 341GC.SuppressFinalize(this);
System\Security\Cryptography\BasicSymmetricCipher.cs (1)
40GC.SuppressFinalize(this);
System\Security\Cryptography\DeriveBytes.cs (1)
14GC.SuppressFinalize(this);
System\Security\Cryptography\HashAlgorithm.cs (1)
167GC.SuppressFinalize(this);
System\Security\Cryptography\HashProvider.cs (1)
69GC.SuppressFinalize(this);
System\Security\Cryptography\MD5.cs (1)
68byte[] buffer = GC.AllocateUninitializedArray<byte>(HashSizeInBytes);
System\Security\Cryptography\RandomNumberGenerator.cs (1)
28GC.SuppressFinalize(this);
System\Security\Cryptography\SHA1.cs (1)
65byte[] buffer = GC.AllocateUninitializedArray<byte>(HashSizeInBytes);
System\Security\Cryptography\SHA256.cs (1)
64byte[] buffer = GC.AllocateUninitializedArray<byte>(HashSizeInBytes);
System\Security\Cryptography\SHA384.cs (1)
64byte[] buffer = GC.AllocateUninitializedArray<byte>(HashSizeInBytes);
System\Security\Cryptography\SHA512.cs (1)
64byte[] buffer = GC.AllocateUninitializedArray<byte>(HashSizeInBytes);
System\Security\Cryptography\SP800108HmacCounterKdfImplementationManaged.cs (1)
16_key = GC.AllocateArray<byte>(key.Length, pinned: true);
System\Security\Cryptography\SymmetricAlgorithm.cs (6)
188GC.SuppressFinalize(this); 522byte[] decryptBuffer = GC.AllocateUninitializedArray<byte>(ciphertext.Length); 641byte[] buffer = GC.AllocateUninitializedArray<byte>(ciphertextLength); 928byte[] buffer = GC.AllocateUninitializedArray<byte>(ciphertextLength); 1124byte[] decryptBuffer = GC.AllocateUninitializedArray<byte>(ciphertext.Length); 1364byte[] buffer = GC.AllocateUninitializedArray<byte>(ciphertextLength);
System\Security\Cryptography\UniversalCryptoDecryptor.cs (1)
155byte[] buffer = GC.AllocateUninitializedArray<byte>(inputCount);
System\Security\Cryptography\UniversalCryptoEncryptor.cs (1)
50byte[] buffer = GC.AllocateUninitializedArray<byte>(ciphertextLength);
System\Security\Cryptography\UniversalCryptoTransform.cs (1)
66GC.SuppressFinalize(this);
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (1)
93GC.KeepAlive(cert); // ensure cert's safe handle isn't finalized while raw handle is in use
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (1)
450byte[] certBytes = GC.AllocateUninitializedArray<byte>(fields.DecodedDataLength);
System\Security\Cryptography\X509Certificates\X509Chain.cs (1)
197GC.SuppressFinalize(this);
System.Security.Cryptography.Pkcs (1)
Internal\Cryptography\PkcsHelpers.cs (1)
148GC.KeepAlive(originalCert);
System.Threading (2)
System\Threading\Barrier.cs (1)
916GC.SuppressFinalize(this);
System\Threading\CountdownEvent.cs (1)
141GC.SuppressFinalize(this);
System.Threading.RateLimiting (5)
System\Threading\RateLimiting\PartitionedRateLimiter.T.cs (2)
96GC.SuppressFinalize(this); 120GC.SuppressFinalize(this);
System\Threading\RateLimiting\RateLimiter.cs (2)
132GC.SuppressFinalize(this); 156GC.SuppressFinalize(this);
System\Threading\RateLimiting\RateLimitLease.cs (1)
80GC.SuppressFinalize(this);
System.Threading.Tasks.Dataflow (2)
Base\DataflowBlock.cs (2)
412GC.SuppressFinalize(this); 498GC.SuppressFinalize(this);
System.Transactions.Local (1)
System\Transactions\InternalTransaction.cs (1)
416GC.SuppressFinalize(this);
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
537GC.Collect();
System.Windows.Forms (66)
System\Resources\ResXResourceReader.cs (1)
185GC.SuppressFinalize(this);
System\Resources\ResXResourceWriter.cs (1)
514GC.SuppressFinalize(this);
System\Windows\Forms\Accessibility\AccessibleObject.cs (1)
2771GC.KeepAlive(this);
System\Windows\Forms\ActiveX\AxHost.ConnectionPointCookie.cs (1)
85GC.SuppressFinalize(this);
System\Windows\Forms\ActiveX\AxHost.cs (1)
3219GC.KeepAlive(this);
System\Windows\Forms\ActiveX\AxHost.State.cs (1)
374GC.SuppressFinalize(this);
System\Windows\Forms\Application.cs (2)
1138GC.KeepAlive(handle); 1203GC.KeepAlive(handle);
System\Windows\Forms\Application.ThreadContext.cs (1)
345GC.SuppressFinalize(this);
System\Windows\Forms\ApplicationContext.cs (2)
36GC.SuppressFinalize(this); 94GC.SuppressFinalize(this);
System\Windows\Forms\Control.cs (2)
9277GC.KeepAlive(this); 12573GC.KeepAlive(this);
System\Windows\Forms\Control.FontHandleWrapper.cs (1)
36GC.SuppressFinalize(this);
System\Windows\Forms\Control.MetafileDCWrapper.cs (1)
79GC.SuppressFinalize(this);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
3231GC.KeepAlive(this); 3371GC.KeepAlive(this);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5731GC.KeepAlive(this);
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
757GC.SuppressFinalize(this);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1130GC.SuppressFinalize(this);
System\Windows\Forms\Controls\DataGridView\DataGridViewElement.cs (1)
33GC.SuppressFinalize(this);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1512GC.KeepAlive(this);
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (1)
79GC.SuppressFinalize(this);
System\Windows\Forms\Controls\ListView\ListView.cs (2)
4915GC.KeepAlive(this); 5538GC.KeepAlive(callback);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1006GC.SuppressFinalize(this);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntryCollection.cs (1)
19GC.SuppressFinalize(this);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
2918GC.KeepAlive(callback); 3018GC.KeepAlive(callback);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
704GC.KeepAlive(ParentInternal);
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1632GC.KeepAlive(toolTip);
System\Windows\Forms\Controls\ToolStrips\CachedItemHdcInfo.cs (1)
66GC.SuppressFinalize(this);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
3580GC.KeepAlive(ItemHdcInfo);
System\Windows\Forms\Controls\WebBrowser\HtmlHistory.cs (1)
33GC.SuppressFinalize(this);
System\Windows\Forms\Controls\WebBrowser\HtmlShim.cs (1)
80GC.SuppressFinalize(this);
System\Windows\Forms\DataBinding\Command.cs (1)
81GC.Collect();
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (1)
106GC.KeepAlive(Parent);
System\Windows\Forms\Design\PropertyTab.cs (1)
89GC.SuppressFinalize(this);
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (2)
252GC.KeepAlive(ownerWindowProcedure); 261GC.KeepAlive(ownerHwnd.Wrapper);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (2)
518_charBuffer = GC.AllocateArray<char>(newBufferSize, pinned: true); 744_charBuffer = GC.AllocateArray<char>(FileBufferSize, pinned: true);
System\Windows\Forms\Form.cs (6)
2951GC.KeepAlive(this); 3433GC.KeepAlive(_ctlClient); 3662GC.KeepAlive(ownerHandle.Wrapper); 4910GC.KeepAlive(this); 5712GC.KeepAlive(ownerHwnd.Wrapper); 6024GC.KeepAlive(ownerHwnd);
System\Windows\Forms\Help\Help.cs (1)
218GC.KeepAlive(handle.Wrapper);
System\Windows\Forms\Input\Cursor.cs (4)
35GC.SuppressFinalize(this); 48GC.SuppressFinalize(this); 58GC.SuppressFinalize(this); 239GC.SuppressFinalize(this);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
1480GC.KeepAlive(this);
System\Windows\Forms\MDI\MDIClient.cs (1)
272GC.KeepAlive(child);
System\Windows\Forms\NativeWindow.cs (3)
326GC.ReRegisterForFinalize(this); 546GC.SuppressFinalize(this); 696GC.SuppressFinalize(this);
System\Windows\Forms\Rendering\DrawingEventArgs.cs (1)
106GC.SuppressFinalize(paletteScope);
System\Windows\Forms\Rendering\PaintEventArgs.cs (1)
93GC.SuppressFinalize(this);
System\Windows\Forms\StringSource.cs (1)
53GC.KeepAlive(edit.Wrapper);
System\Windows\Forms\Timer.cs (1)
315GC.KeepAlive(this);
System\Windows\Forms\ToolTip\ToolTipBuffer.cs (1)
27_buffer = GC.AllocateUninitializedArray<char>(text.Length + 1, pinned: true);
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
904GC.SuppressFinalize(this);
System\Windows\Forms\WindowSubclassHandler.cs (2)
134GC.SuppressFinalize(this); 158GC.KeepAlive(_windowProcDelegate);
System.Windows.Forms.Design (2)
System\ComponentModel\Design\ComponentDesigner.cs (1)
240GC.SuppressFinalize(this);
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
1263GC.SuppressFinalize(this);
System.Windows.Forms.Primitives (84)
System\Windows\Forms\RefCountedCache.CacheEntry.cs (1)
87GC.SuppressFinalize(this);
System\Windows\Forms\RefCountedCache.cs (1)
190GC.SuppressFinalize(this);
Windows\Win32\PInvoke.ChildWindowFromPointEx.cs (1)
15GC.KeepAlive(hwndParent.Wrapper);
Windows\Win32\PInvoke.ClientToScreen.cs (1)
15GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.CloseHandle.cs (1)
12GC.KeepAlive(handle.Wrapper);
Windows\Win32\PInvoke.DestroyAcceleratorTable.cs (1)
13GC.KeepAlive(hAccel.Wrapper);
Windows\Win32\PInvoke.DrawMenuBar.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.EnableMenuItem.cs (1)
13GC.KeepAlive(hMenu.Wrapper);
Windows\Win32\PInvoke.EnableScrollBar.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.EnableWindow.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.EndDialog.cs (1)
13GC.KeepAlive(hDlg.Wrapper);
Windows\Win32\PInvoke.FillRect.cs (1)
13GC.KeepAlive(hDC.Wrapper);
Windows\Win32\PInvoke.GetAncestor.cs (1)
12GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.GetDlgItem.cs (1)
13GC.KeepAlive(hDlg.Wrapper);
Windows\Win32\PInvoke.GetDpiForWindow.cs (1)
14GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.GetMenu.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.GetMenuItemCount.cs (1)
13GC.KeepAlive(hMenu.Wrapper);
Windows\Win32\PInvoke.GetParent.cs (1)
12GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.GetScrollInfo.cs (1)
13GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.GetSystemMenu.cs (1)
12GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.GetTextExtentPoint32.cs (1)
16GC.KeepAlive(hdc.Wrapper);
Windows\Win32\PInvoke.GetThemeFont.cs (1)
17GC.KeepAlive(hTheme.Wrapper);
Windows\Win32\PInvoke.GetWindow.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.HtmlHelp.cs (3)
15GC.KeepAlive(hwndCaller.Wrapper); 26GC.KeepAlive(hwndCaller.Wrapper); 43GC.KeepAlive(hwndCaller.Wrapper);
Windows\Win32\PInvoke.ImageList.cs (15)
16GC.KeepAlive(himl.Wrapper); 24GC.KeepAlive(himl.Wrapper); 33GC.KeepAlive(himl.Wrapper); 51GC.KeepAlive(himl.Wrapper); 52GC.KeepAlive(hdcDst.Wrapper); 63GC.KeepAlive(himl.Wrapper); 72GC.KeepAlive(himl.Wrapper); 80GC.KeepAlive(himl.Wrapper); 88GC.KeepAlive(himl.Wrapper); 96GC.KeepAlive(himl.Wrapper); 107GC.KeepAlive(himl.Wrapper); 108GC.KeepAlive(hicon.Wrapper); 116GC.KeepAlive(himl.Wrapper); 125GC.KeepAlive(himl.Wrapper); 137GC.KeepAlive(himl.Wrapper);
Windows\Win32\PInvoke.ImmGetContext.cs (1)
14GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.ImmReleaseContext.cs (1)
14GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.IntersectClipRect.cs (1)
12GC.KeepAlive(hdc.Wrapper);
Windows\Win32\PInvoke.InvalidateRect.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.InvalidateRgn.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.IsAccelerator.cs (1)
13GC.KeepAlive(hAccel.Wrapper);
Windows\Win32\PInvoke.IsChild.cs (2)
14GC.KeepAlive(hWndParent.Wrapper); 15GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.IsWindow.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.IsWindowEnabled.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.IsWindowVisible.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.KillTimer.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.NotifyWinEvent.cs (1)
13GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.RedrawWindow.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.ScreenToClient.cs (1)
15GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.ScrollWindow.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.ScrollWindowEx.cs (1)
20GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SendMessageCallback.cs (1)
21GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetActiveWindow.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetCapture.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetFocus.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetForegroundWindow.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetLayeredWindowAttributes.cs (1)
13GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.SetMenu.cs (3)
13GC.KeepAlive(hWnd.Wrapper); 23GC.KeepAlive(hWnd.Wrapper); 24GC.KeepAlive(hMenu.Wrapper);
Windows\Win32\PInvoke.SetParent.cs (2)
14GC.KeepAlive(hWndChild.Wrapper); 15GC.KeepAlive(hWndNewParent.Wrapper);
Windows\Win32\PInvoke.SetScrollInfo.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetScrollPos.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetTimer.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SetWindowPos.cs (2)
14GC.KeepAlive(hWnd.Wrapper); 15GC.KeepAlive(hWndInsertAfter.Wrapper);
Windows\Win32\PInvoke.SetWindowRgn.cs (1)
13GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.SetWindowText.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.SHAutoComplete.cs (1)
12GC.KeepAlive(hwndEdit.Wrapper);
Windows\Win32\PInvoke.ShowWindow.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.UiaHostProviderFromHwnd.cs (1)
15GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.UiaReturnRawElementProvider.cs (1)
20GC.KeepAlive(hwnd.Wrapper);
Windows\Win32\PInvoke.UpdateWindow.cs (1)
12GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\PInvoke.ValidateRect.cs (1)
13GC.KeepAlive(hWnd.Wrapper);
Windows\Win32\System\Com\StandardDispatch.cs (1)
298GC.SuppressFinalize(this);
Windows\Win32\UI\Controls\ToolInfoWrapper.cs (1)
48GC.KeepAlive(_handle);
System.Windows.Forms.Primitives.TestUtilities (2)
Metafiles\EmfScope.cs (1)
256GC.SuppressFinalize(this);
Win32\Window.cs (1)
49GC.SuppressFinalize(this);
System.Windows.Forms.Tests (23)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (4)
1631GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, blocking: true); 1651GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, blocking: true);
System\Windows\Forms\Application.ParkingWindowTests.cs (2)
25GC.Collect(); 27GC.WaitForPendingFinalizers();
System\Windows\Forms\ControlTests.Internals.cs (2)
409GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, blocking: true);
System\Windows\Forms\LayoutEventArgsTests.cs (2)
51GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced, blocking: true);
System\Windows\Forms\ListViewTests.cs (3)
1114GC.Collect(); // mark for finalization (also would clear normal weak references) 1115GC.WaitForPendingFinalizers(); // wait until finalizer is executed 1116GC.Collect(); // wait for long weak reference to be cleared
System\Windows\Forms\PropertyGridTests.cs (2)
3902GC.Collect(); 3903GC.WaitForPendingFinalizers();
System\Windows\Forms\PropertyStoreTests.cs (4)
161long currentBytes = GC.GetAllocatedBytesForCurrentThread(); 163currentBytes = GC.GetAllocatedBytesForCurrentThread() - currentBytes; 196long currentBytes = GC.GetAllocatedBytesForCurrentThread(); 198currentBytes = GC.GetAllocatedBytesForCurrentThread() - currentBytes;
System\Windows\Forms\ToolStripTests.cs (4)
7327GC.Collect(); 7328GC.WaitForPendingFinalizers(); 7329GC.Collect(); 7330GC.WaitForPendingFinalizers();
System.Windows.Forms.UI.IntegrationTests (1)
ImageListTests.cs (1)
72GC.GetTotalMemory(true);
System.Xaml (5)
System\Xaml\NameScope.cs (1)
267public void Dispose() => GC.SuppressFinalize(this);
System\Xaml\NameScopeDictionary.cs (1)
156GC.SuppressFinalize(this);
System\Xaml\Parser\NodeStreamSorter.cs (1)
160GC.SuppressFinalize(this);
System\Xaml\XamlReader.cs (1)
55GC.SuppressFinalize(this);
System\Xaml\XamlWriter.cs (1)
72GC.SuppressFinalize(this);
UIAutomationClient (7)
MS\Internal\Automation\UiaCoreApi.cs (7)
363GC.KeepAlive(request._condition); // keep condition (and associated unmanaged memory) alive during call 375GC.KeepAlive(request._condition); // keep condition (and associated unmanaged memory) alive during call 387GC.KeepAlive(request._condition); // keep condition (and associated unmanaged memory) alive during call 429GC.KeepAlive(request._condition); // keep condition (and associated unmanaged memory) alive during call 446GC.KeepAlive(request._condition); // keep condition (and associated unmanaged memory) alive during call 447GC.KeepAlive(findCondition); 587GC.KeepAlive(request._condition); // keep condition (and associated unmanaged memory) alive during call
UIAutomationTypes (2)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (1)
119GC.Collect();
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (1)
2011GC.SuppressFinalize(this);
vbc (1)
src\Compilers\Shared\BuildClient.cs (1)
333GC.SuppressFinalize(npcs);
VBCSCompiler (2)
src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (1)
233GC.GetTotalMemory(forceFullCollection: true);
src\Compilers\Shared\BuildClient.cs (1)
333GC.SuppressFinalize(npcs);
VBCSCompiler.UnitTests (2)
CompilerServerTests.cs (2)
845GC.KeepAlive(rootDirectory); 959GC.KeepAlive(rootDirectory);
Wasm.Performance.TestApp (1)
WasmMemory.cs (1)
11public static long GetTotalMemory() => GC.GetTotalMemory(forceFullCollection: true);
WinFormsControlsTest (7)
FormOwnerTestForm.cs (6)
26long memoryStart = GC.GetTotalMemory(false); 40long memoryBeforeGC = GC.GetTotalMemory(false); 41GC.Collect(); 42GC.WaitForPendingFinalizers(); 43GC.Collect(); 44long memoryAfterGC = GC.GetTotalMemory(true);
ScalingBeforeChanges.cs (1)
52GC.KeepAlive(this);