CsvHelper icon indicating copy to clipboard operation
CsvHelper copied to clipboard

CsvWriter doesn't have a finalizer

Open nyquistms opened this issue 4 years ago • 1 comments

Describe the bug CsvWriter doesn't have a finalizer. So when the Writer isn't disposed it will not flush its content.

To Reproduce n/a

Expected behavior CsvWriter should flush in finalizer

Screenshots n/a

Additional context n/a

nyquistms avatar Jun 07 '21 14:06 nyquistms

Writers in .NET like StreamWriter don't do this. I was looking up why and came across this. https://social.msdn.microsoft.com/Forums/en-US/da7bc3e6-70fa-479b-a35c-fd8bbc72b6c5/should-streamwriter-autoclose-in-destructor?forum=csharplanguage

Thoughts?

JoshClose avatar Jun 07 '21 20:06 JoshClose