JL.
JL.

Reputation: 81342

Do you still need to dispose attachments in .net v4 System.Net.Mail?

With .net v3.5 or less it was required to manually dispose attachments after sending an email using SMTP client, is this still required in .net v4?

Upvotes: 2

Views: 128

Answers (2)

driis
driis

Reputation: 164331

Yes. The class is IDisposable and the MSDN example still calls Dispose on it.

Upvotes: 1

Simon P Stevens
Simon P Stevens

Reputation: 27499

According to MSDN, the Dispose() method still exists in .net 4, and the notes still say you should call it, so I would assume nothing has changed.

Upvotes: 2

Related Questions