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

Undisposed assignments from a method to property are marked as "field" not disposed #74

Closed BADF00D closed 6 years ago

BADF00D commented 6 years ago

Prerequisites

Description

A undisposed MemoryStream that is created within an method and assigned to a property should be marked as "Property not disposed" but is marked as "Field not disposed".

Source Code

using System.IO;

namespace MyNamespace
{
    class MyClass
    {
        public MemoryStream Stream { get; private set; }
        public void SomeMethod()
        {
            Stream = new MemoryStream();
        }
    }
}

Screenshot

image

BADF00D commented 6 years ago

Will be part or release 0.39