microsoft-graph-devx-api icon indicating copy to clipboard operation
microsoft-graph-devx-api copied to clipboard

C# sample - stream disposal

Open baywet opened this issue 5 years ago • 6 comments

Downloading the file using C# creates a stream which is IDisposable. I don't think the SDK disposes streams by itself (how would it know when the stream is not needed anymore?) which means the caller should dispose it. The sample should include a using statement IMHO so people don't forget to dispose the stream and get issue with memory management.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

baywet avatar Nov 12 '19 14:11 baywet

Note: it might apply as well to Java and Objective-C but I'm not proefficient enough in those languages to know for sure.

baywet avatar Nov 12 '19 14:11 baywet

maybe interesting for @peombwa

baywet avatar Jun 08 '20 16:06 baywet

Hello @andrueastman, @JeremyKelley,

Who can take a look at this? It's over 922 days old.

Cc: @FaithOmbongi

henrymbuguakiarie avatar May 24 '22 08:05 henrymbuguakiarie

Transferring this one to the snippet generator repo

andrueastman avatar May 24 '22 08:05 andrueastman

@andrueastman please add a link to the issue on the generator repo so that I can close this one

njaci1 avatar Nov 16 '22 08:11 njaci1

@njaci1 the issue is not with code generation but with snippets generation. And the code for snippets generation lives here. This issue is at the right place.

baywet avatar Nov 16 '22 11:11 baywet