[x] I have verified that I am running the latest version of DisposableFixer: 1.5.0
[x] I have searched open and closed issues to ensure it has not already been reported
Description
The sample code shows a new object creation (new SomeDisposable) and a factory method(CreateNew). The return type of the factory method get disposed, but the object creation does not. But the object creation is not marked as undisposed.
Source Code
using System;
namespace RxTimeoutTest
{
internal class SomeClass
{
private IDisposable _field;
public void Exchange() {
using (var disposable = new SomeDisposable().CreateDisposable()) {
}
}
}
internal class SomeDisposable : IDisposable
{
public void Dispose()
{
}
public SomeDisposable CreateDisposable()
{
return new SomeDisposable();
}
}
}
Prerequisites
Description
The sample code shows a new object creation (new SomeDisposable) and a factory method(CreateNew). The return type of the factory method get disposed, but the object creation does not. But the object creation is not marked as undisposed.
Source Code
Screenshot