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

Return values in Local method should be ignored #125

Closed BADF00D closed 5 years ago

BADF00D commented 5 years ago

Prerequisites

Description

When defining a local function that doesn't hide the IDisposable, there should be no warning.

Source Code

using System.IO;

namespace RxTimeoutTest
{
    internal class SomeClass
    {
        public object CreateDisposable()
        {
            MemoryStream Create() => new MemoryStream();
            return Create();
        }
    }
}

Screenshot

image