Getting CA1001-warning when running code analysis

Jan 18, 2013 at 9:02 AM
Edited Jan 18, 2013 at 9:18 AM


I want to use Task Scheduler Engine in a customer project. One requirement is that 3rd party libraries should not cause any CA1001-warning ("Types that own disposable fields should be disposable", in the code analysis. 

However when analyzing Task Scheduler Engine I get this warning:

CA1001    Types that own disposable fields should be disposable    Implement IDisposable on 'SerializedAccessProperty<T>' because it creates members of the following IDisposable types: 'ReaderWriterLockSlim'. If 'SerializedAccessProperty<T>' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers.    TaskSchedulerEngine    SerializedAccessProperty.cs    14

Is there any reason why IDisposable isn't implemented on 'SerializedAccessProperty<T>'?



Jan 21, 2013 at 6:26 AM

Nope, that looks like a bug. By all means please fork the source and fix it :)