Closing the File-Mapping Object
When a process has finished with the file-mapping object, it should destroy
all file views in its address space by using the
UnmapViewOfFile function for each file view. This function invalidates the pointer to the
process's virtual address space. If any of the pages of the file view have changed
since the view was mapped, the system writes the changed pages of the file to
disk using caching. To commit the data to disk immediately, call the
FlushViewOfFile function before unmapping the file view.
You must call the
CloseHandle function to first close the file-mapping object and then close the file on
disk. These calls to
CloseHandle succeed even when there are file views that are still open. However, leaving
file views mapped causes memory leaks.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database