Reputation: 101
I am using the WinSCP .NET assembly in order to "monitor" on a FTP server, and download every file that is uploaded to the FTP server.
After leaving my program running all night, the ram usage was over 1gb, and after debugging and checking with profiling programs, it happened because of Session.Output
, which is an Enumerable collection of strings, which never gets cleared, and collects everything that happens to this Enumerable instead into a log file. I tried adding log file paths to Session.DebugLogPath
and Session.SessionLogPath
, which copied the Enumerable into a file, but didn't clear it.
How can I disable / clear the Session.Output
?
Upvotes: 0
Views: 776
Reputation: 202360
Since WinSCP 5.7.6, WinSCP .NET assembly holds only the last 1000 lines of the output.
Please upgrade.
Note that the Session.Output
is not related to the Session.SessionLogPath
or the Session.DebugLogPath
. They each log different information.
Upvotes: 1