microsoftgraph / microsoft-graph-devx-api

Services API for Graph Explorer
MIT License
88 stars 31 forks source link

C# sample - stream disposal #1009

Open baywet opened 4 years ago

baywet commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

maybe interesting for @peombwa

henrymbuguakiarie commented 2 years ago

Hello @andrueastman, @JeremyKelley,

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

Cc: @FaithOmbongi

andrueastman commented 2 years ago

Transferring this one to the snippet generator repo

njaci1 commented 1 year ago

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

baywet commented 1 year ago

@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.