Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Maximum Memory

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

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();
}