<PackageReference Include="Microsoft.Data.SqlClient" Version="7.1.0-preview3.26238.4" />

Microsoft.Data.SqlClient.ConnectionPool.PoolPruner

sealed class PoolPruner : IDisposable
Encapsulates idle connection pruning logic for ChannelDbConnectionPool. Periodically samples the idle connection count and, once enough samples are collected, computes the median and prunes that many idle connections from the pool.

This type is only instantiated when the pool can shrink (MinPoolSize < MaxPoolSize) and idle-timeout based reclamation is enabled (Connection Idle Timeout > 0). When the pool is fixed-size or idle reclamation is disabled, the pool holds no PoolPruner instance.

public void Dispose()

Stops the pruning timer and releases resources. Safe to call multiple times; Dispose is idempotent and does not throw.