We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private void setSeqNum() { seqNumsFile_.Seek(0, System.IO.SeekOrigin.Begin); System.IO.StreamWriter writer = new System.IO.StreamWriter(seqNumsFile_); writer.Write(GetNextSenderMsgSeqNum().ToString("D10") + " : " + GetNextTargetMsgSeqNum().ToString("D10") + " "); writer.Flush(); }
writer isn't closed/disposed. Should wrap in a using() block. Since .Net 4.5 it's possible to dispose StreamWriter without closing the underlying stream: https://connect.microsoft.com/VisualStudio/feedback/details/164680/streamwriter-incorrectly-disposes-underlying-stream Or maybe it should be keeping the StreamWriter in the seqNumsFile instance variable instead of the underlying FileStream.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
writer isn't closed/disposed. Should wrap in a using() block.
Since .Net 4.5 it's possible to dispose StreamWriter without closing the underlying stream:
https://connect.microsoft.com/VisualStudio/feedback/details/164680/streamwriter-incorrectly-disposes-underlying-stream
Or maybe it should be keeping the StreamWriter in the seqNumsFile instance variable instead of the underlying FileStream.
The text was updated successfully, but these errors were encountered: