Ignore:
Timestamp:
2/8/2010 8:25:51 AM (2 years ago)
Author:
lowjoel
Message:

Allow all IDisposable patterns to be reentrant. Addresses #275: Code Review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/CodeReview/Eraser.Util/VolumeInfo.cs

    r1770 r1772  
    747747        private void Dispose(bool disposing) 
    748748        { 
     749            if (Stream == null) 
     750                return; 
     751 
    749752            //Flush the contents of the buffer to disk since after we unlock the volume 
    750753            //we can no longer write to the volume. 
     
    758761                throw new IOException("Could not unlock volume."); 
    759762            } 
     763 
     764            //Set the stream to null so that we won't run this function again. 
     765            Stream = null; 
    760766        } 
    761767 
Note: See TracChangeset for help on using the changeset viewer.