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

Separate dispose call is not considered #39

Closed mhamri closed 7 years ago

mhamri commented 7 years ago

I'm calling dispose method separately, but still the line marked as not disposed

S3 s3;
if (!string.IsNullOrWhiteSpace(AwsAppId) && !string.IsNullOrWhiteSpace(AwsAppId))
{
    s3 = new S3(AwsAppId, AwsSecretKey); // this line is marked as not disposed
}
else
{
    s3 = new S3(); // this line is marked as not disposed
}

var signedUrl = s3.GetPreSignedUrl(PbAppUserBucket, fileUrl, 10, HttpVerb.GET);
photo.Filename = signedUrl;
s3.Dispose();
BADF00D commented 7 years ago

Fixed in release 0.22