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/Security.cs

    r1770 r1772  
    148148        private void Dispose(bool disposing) 
    149149        { 
     150            //If we already have run Dispose, then handle will be null. 
     151            if (handle == null) 
     152                return; 
     153 
    150154            if (disposing) 
    151155                handle.Close(); 
     156 
     157            //Don't run Dispose again. 
     158            handle = null; 
    152159        } 
    153160 
Note: See TracChangeset for help on using the changeset viewer.