- <para>To create a class derived from <see cref="T:System.Runtime.InteropServices.SafeHandle" />, you must know how to create and free an operating system handle. This process is different for different handle types because some use the [CloseHandle](/windows/win32/api/handleapi/nf-handleapi-closehandle) function, while others use more specific functions such as [UnmapViewOfFile](/windows/win32/api/memoryapi/nf-memoryapi-unmapviewoffile) or [FindClose](/windows/win32/api/fileapi/nf-fileapi-findclose). For this reason, you must create a derived class of <see cref="T:System.Runtime.InteropServices.SafeHandle" /> for each operating system handle type that you want to wrap in a safe handle.</para>
0 commit comments