Maximum Memory

Advertisement

fatihtan
Joined:
Posts:
1
Location:
Izmir

Maximum Memory

Hi,

I used WinSCP for SFTP. SessionOptions configuration looks like this. Everything is OK about transfer but memory goes up 100%.

After all operations are done, I call Close() not Dispose().
Should I call dispose?

Thank you.

Auth
SessionOptions sessionOptions = new SessionOptions
{
   Protocol = Protocol.Sftp,
   HostName = _ftpServerUrl,
   UserName = _ftpUsername,
   Password = _ftpPassword,
   SshHostKeyPolicy = SshHostKeyPolicy.AcceptNew,
   PortNumber = ftpPort
};

Usage
using (Session session = new Session())
{
   session.Open(sessionOptions);
 
   //   some operations
 
   session.Close();
}

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,165
Location:
Prague, Czechia

Re: Maximum Memory

You call Dispose – by the using statement.
Your code looks good.
If you need help, we need a minimal reproducible example.

Reply with quote

Advertisement

You can post new topics in this forum