@@ -41,20 +41,20 @@ public bool TryGetExtension<T>(out T ext, nint hdc)
4141
4242public override bool IsExtensionPresent ( string extension ) => IsExtensionPresent ( extension , GetCurrentDC ( ) ) ;
4343
44- private ConcurrentDictionary < nint , HashSet < string > > _extensions ;
44+ private readonly ConcurrentDictionary < nint , HashSet < string > > _extensions = new ( ) ;
4545
4646[ NativeApi ( EntryPoint = "wglGetExtensionsStringARB" ) ]
4747private partial string GetExtensionsString ( nint hdc ) ;
4848
49- private static HashSet < string > ? _empty ;
49+ private static readonly HashSet < string > _empty = new ( ) ;
5050private bool _hasGetExtensionsString ;
5151
5252public bool IsExtensionPresent ( string extension , nint hdc ) => _extensions . GetOrAdd
5353(
5454hdc , hdc=> ! ( _hasGetExtensionsString =
5555_hasGetExtensionsString || GetProcAddress ( "wglGetExtensionsStringARB" ) != 0 )
56- ? _empty ??= new HashSet < string > ( )
57- : new HashSet < string > ( GetExtensionsString ( hdc ) . Split ( ' ' ) )
56+ ? _empty
57+ : new HashSet < string > ( GetExtensionsString ( hdc ) . Split ( ' ' ) )
5858)
5959. Contains ( extension . StartsWith ( "WGL_" ) ? extension : $ "WGL_{ extension } ") ;
6060}