Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void
Esempio n. 1
0
 /// <summary>
 /// Releases the unmanaged resources used by the <see cref="DiskIo"/> object and optionally releases the managed resources.
 /// </summary>
 public void Dispose()
 {
     if (!m_disposed)
     {
         try
         {
             if (m_stream != null)
             {
                 m_stream.Dispose();
             }
         }
         finally
         {
             GC.SuppressFinalize(this);
             m_stream   = null;
             m_disposed = true;
         }
     }
 }