microsoft-graph-devx-api
microsoft-graph-devx-api copied to clipboard
C# sample - stream disposal
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.
- ID: 01fa814a-c3b6-d48a-b724-a63e948bbffd
- Version Independent ID: f417cf48-5780-ebf4-1470-1bf0855d62c1
- Content: Download a file - Microsoft Graph v1.0
- Content Source: api-reference/v1.0/api/driveitem-get-content.md
- Product: sharepoint
- Technology: microsoft-graph
- GitHub Login: @JeremyKelley
- Microsoft Alias: JeremyKelley
Note: it might apply as well to Java and Objective-C but I'm not proefficient enough in those languages to know for sure.
maybe interesting for @peombwa
Hello @andrueastman, @JeremyKelley,
Who can take a look at this? It's over 922 days old.
Cc: @FaithOmbongi
Transferring this one to the snippet generator repo
@andrueastman please add a link to the issue on the generator repo so that I can close this one
@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.