Click here to Skip to main content
15,742,316 members

Comments by Andrew Rissing (Top 122 by date)

Andrew Rissing 1-Apr-13 12:22pm View    
Reason for my vote of 1 \n I'm sorry. Until this is thread safe, I would not recommend this for use. Please reply to this after it has been fixed, and I will adjust my vote.
Andrew Rissing 14-Sep-12 16:13pm View    
Either way, they would be handled properly. The finalizer would be only called if Dispose was somehow missed.

It is up to you whether or not to use the additional using statements for completeness, but ultimately they really shouldn't be necessary.

Anyways, enjoy the weekend. I'll be there shortly myself.
Andrew Rissing 14-Sep-12 15:58pm View    
Cool. I will say though that GZipStream and CryptoStream both dispose of any Stream objects passed to them, so the use of layered using statements would be redundant. Worst case scenario, if the dispose method failed to complete successfully (an entirely exceptional situation here), the finalize method would eventually kick in as a saving grace.

Food for thought.
Andrew Rissing 14-Sep-12 15:16pm View    
Thanks. :)
Andrew Rissing 14-Sep-12 14:06pm View    
I don't believe I've heard any mumblings of this behavior changing any time soon. So, you are likely safe for sometime.

Btw, are you using this to conditionally encrypt/compress your output? Or is this for something else?