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

Add support for method from FakeItEasy A.Fake<IDisposable> #50

Closed dscopra closed 7 years ago

dscopra commented 7 years ago

Prerequisites

Description

If you create an instance of an Interface that implements IDisposable, it is marked as not disposed. But if it is created via A.Fake<IDisposable> there is nothing to disposed, Because there are no resources that have to be disposed and the actual call to Dispose does nothing. So this Disposable can be ignored.

Source Code

public class SomeClass{
    private readonly IDisposable _fake = A.Fake<IDisposable>();
}

Screenshot

image

BADF00D commented 7 years ago

Will be part of release 0.28