Disposes and nulls the specified object.
public static void DisposeObject<T>(ref T? obj)
parameter | description |
---|---|
obj | The object to dispose and null. |
This method is similar to Dispose
, but doesn’t require that the parameter implement IDisposable; it will be checked at runtime.