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 LumenWorks.Framework.IO.Csv.CsvReader to whitelist #62

Closed coxymla closed 7 years ago

coxymla commented 7 years ago

Prerequisites

Description

CsvReader has a constructor that takes in a stream. When the CsvReader is disposed, the stream is disposed. Currently DisposableFixer detects the anonymous stream as not being disposed. It would be great if it was added to the whitelist.

Source Code

using (var csv = new CsvReader(new StreamReader(outputFilename), false)) { // do stuff }

Screenshot

image

BADF00D commented 7 years ago

I just looked up the code in CsvReader. I could not find a constructor with a leaveOpen-flag. So every instance is is always tracking the given stream. It should be no problem at all.

Thanks reporting!

BADF00D commented 7 years ago

Will be part of release 0.30