{"action":"opened","issue":{"url":"https://api.github.com/repos/google/protobuf/issues/679","labels_url":"https://api.github.com/repos/google/protobuf/issues/679/labels{/name}","comments_url":"https://api.github.com/repos/google/protobuf/issues/679/comments","events_url":"https://api.github.com/repos/google/protobuf/issues/679/events","html_url":"https://github.com/google/protobuf/issues/679","id":98714248,"number":679,"title":"Consider making CodedInputStream and CodedOutputStream implement IDisposable","user":{"login":"jskeet","id":17011,"avatar_url":"https://avatars.githubusercontent.com/u/17011?v=3","gravatar_id":"","url":"https://api.github.com/users/jskeet","html_url":"https://github.com/jskeet","followers_url":"https://api.github.com/users/jskeet/followers","following_url":"https://api.github.com/users/jskeet/following{/other_user}","gists_url":"https://api.github.com/users/jskeet/gists{/gist_id}","starred_url":"https://api.github.com/users/jskeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskeet/subscriptions","organizations_url":"https://api.github.com/users/jskeet/orgs","repos_url":"https://api.github.com/users/jskeet/repos","events_url":"https://api.github.com/users/jskeet/events{/privacy}","received_events_url":"https://api.github.com/users/jskeet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/protobuf/labels/c%23","name":"c#","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-03T10:27:56Z","updated_at":"2015-08-03T10:27:56Z","closed_at":null,"body":"Currently our stream wrappers feel a little odd, as they can't be disposed, and need manual flushing in the case of CodedOutputStream.\r\n\r\nThis is somewhat mitigated by the extension methods on `IMessage` which flush the output stream - allowing us to write:\r\n\r\n```csharp\r\nusing (var stream = File.OpenWrite(...))\r\n{\r\n     message.WriteTo(stream);\r\n}\r\n```\r\n\r\n... without the caller \"knowing\" about `CodedOutputStream` at all.\r\n\r\nAssigning to @jtattermusch for comment."}}