WmiConnections are stored in a dictionary for reuse and are never closed / disposed
|
private readonly Dictionary<string, WmiConnection> _wmiConnectionDict = new Dictionary<string, WmiConnection>(); |
I guess there is a performance reason for caching these WmiConnections otherwise one should be used for each query and then be closed / disposed.
Maybe it would be best to implement IDisposable in IHardwareInfo?
WmiConnections are stored in a dictionary for reuse and are never closed / disposed
Hardware.Info/Hardware.Info.Aot/Windows/WmiLightQueryProvider.cs
Line 9 in 2d594ef
I guess there is a performance reason for caching these WmiConnections otherwise one should be used for each query and then be closed / disposed.
Maybe it would be best to implement
IDisposableinIHardwareInfo?