Skip to content

Commit

Permalink
fix kinesis sample StreamWriter memory management
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyhoffman committed Apr 8, 2016
1 parent cba0e83 commit 69e0884
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Kinesis/KinesisExample.cs
Expand Up @@ -97,12 +97,9 @@ public void PutRecord()
{
ResultText.text = string.Format("Putting record with data '{0}' to Kinesis stream '{1}'.", RecordField.text, StreamNameField.text);
using (var memoryStream = new MemoryStream())
using (var streamWriter = new StreamWriter(memoryStream))
{
using (var streamWriter = new StreamWriter(memoryStream))
{
streamWriter.Write(RecordField.text);
}

streamWriter.Write(RecordField.text);
Client.PutRecordAsync(new PutRecordRequest
{
Data = memoryStream,
Expand Down

0 comments on commit 69e0884

Please sign in to comment.