BADF00D / DisposableFixer

This is a Visual Studio Extension and NuGet package that should identify and fix problems as memleaks while using IDisposables.
Other
35 stars 7 forks source link

Problems with IDisposables fields that get initialized in Ctor #4

Closed BADF00D closed 8 years ago

BADF00D commented 8 years ago

The following should show a problem:

using System.IO;
namespace DisFixerTest {
    class ClassWithUndisposedMemoryStreamAsFieldThatIsInitializedInCtor {
        private readonly MemoryStream _memStream;
        public ClassWithUndisposedMemoryStreamAsFieldThatIsInitializedInCtor() {
            _memStream = new MemoryStream();
        }
    }
}