Can creating and returning a disposable object from a static class method cause memory leaks?

I’ve noticed a windows service taking a lot of memory and am trying to get to the bottom of the issue. I noticed that we have a static class containing a static method which is in charge of creating and returning an SftpClient instance, which implements IDisposable. Code for this static class is below. public… Read More Can creating and returning a disposable object from a static class method cause memory leaks?