Topic "Dispose XMLReader in SessionLogReader"

Author Message
sessile.fielder
[View user's profile]

Joined: 2013-04-25
Posts: 2
I think you need to add this to your Cleanup method:

Code:
((IDisposable)_reader).Dispose();

You have to cast it to IDisposable before disposing it because it uses explicit interface implementation.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Thanks for your hint.
Is there any reason you consider it that important? Apart from being a good practice?
sessile.fielder
[View user's profile]

Joined: 2013-04-25
Posts: 2
Nope, I don't think it's important at all since you're already disposing the stream it's using, but it is good practice. I was just going through the source to try to understand some things better and noticed it.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Ok. Done. Thanks.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License