Re: Solved problem with IDisposable
I was getting dozens of WinSCP processes and eventually a 'connection failed' error. Implementing IDisposable in the SCP class then calling .Dispose() after each use solved the problem.
The
Session
class implements IDisposable
:
https://winscp.net/eng/docs/library_session#syntax
Note the use of
using
in all .NET examples for WinSCP .NET assembly.
One example out of many: https://winscp.net/eng/docs/library#example