[x] I have verified that I am running the latest version of DisposableFixer: 1.6.0
[x] I have searched open and closed issues to ensure it has not already been reported
Description
If a factory method creates an IDisposable-Instance, but the return type does not implement IDisposable, then there should be a warning. The caller of the method has no clue, that the result should be disposed.
Source Code
using System.IO;
namespace DisposableFixer.Test
{
public class Dummy
{
public object CreateMemoryStream()
{
return new MemoryStream();
}
}
}
Prerequisites
Description
If a factory method creates an IDisposable-Instance, but the return type does not implement IDisposable, then there should be a warning. The caller of the method has no clue, that the result should be disposed.
Source Code
Screenshot