dotnet / dotnet/dotnet-api-docs

Example seems to be missing the dispose call

Open
#1,664 0 comments 0 reactions 0 assignees View on GitHub
area-Microsoft.Win32 dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

The remark says: "This type implements the IDisposable interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its Dispose method in a try/catch block. To dispose of it indirectly, use a language construct such as using (in C#) or Using (in Visual Basic)."
I cannot find this anywhere in the example.

---
#### Document Details

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

* ID: fe4d2c18-2b48-257e-b274-14fee9ddadfd
* Version Independent ID: 8087ab00-b4ab-3202-97fb-7f851b525d69
* Content: [SafeFileHandle Class (Microsoft.Win32.SafeHandles)](https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.safehandles.safefilehandle?view=netframework-4.7.2)
* Content Source: [xml/Microsoft.Win32.SafeHandles/SafeFileHandle.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Win32.SafeHandles/SafeFileHandle.xml)
* Product: **dotnet-api**
* GitHub Login: @mairaw
* Microsoft Alias: **mairaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.