Skip to content

Add explicit cleanup of memory-mapped file handles (windows)#18

Open
WardLordRuby wants to merge 2 commits intojonhoo:mainfrom
WardLordRuby:win-cleanup
Open

Add explicit cleanup of memory-mapped file handles (windows)#18
WardLordRuby wants to merge 2 commits intojonhoo:mainfrom
WardLordRuby:win-cleanup

Conversation

@WardLordRuby
Copy link
Copy Markdown

Explicitly call UnmapViewOfFile and CloseHandle to release the memory-mapped file resources. In this case where the memory map lives for the entire duration of the program windows would clean them up on process exit, however this commit has the added benefit of minimizing the diff if anyone decides to add platform-specific code in the future.

A new method feels much more idiomatic than a free standing function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant