The container is keeping objects alive because it promised to dispose them. Every scope, including the root, tracks the transient IDisposables it creates until the scope ends; for the root that means process shutdown. Typical causes are resolving from app.Services or from an IServiceProvider injected into a singleton (which is the root), or a scope created once and never disposed. ValidateScopes doesn't catch it.
Find the type and call site from the gcdump's retention path (ServiceProviderEngineScope → disposables), then either create a scope per operation with IServiceScopeFactory.CreateAsyncScope() when several scoped services are needed, or use a factory whose result you dispose with using when it's one object. The cost of leaving it: a growing Gen2 heap, longer full GCs and eventual OOM kills. Verify with dotnet-counters over several hours.
Checks they can recognise the root-tracked transient leak in a dump
Last updated 23 Nov 2026.