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

IDisposable returned by expression body syntax yields an error #84

Closed BADF00D closed 6 years ago

BADF00D commented 6 years ago

Prerequisites

Description

When converting an statement body to an expression body, the IDisposable that gets returned is marked as undisposed, but it should not because it is a factory method.

Source Code

namespace SomeNamespace
{
    class SomeClass
    {
        public IDisposable Bla() => new MemoryStream();
    }

}

Screenshot

2018-08-14_11-28-09

BADF00D commented 6 years ago

Fixed with #85