Originally filed at http://java.net/jira/browse/JNA-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315115#action_315115.
The only reason for the win32-specific shutdown hook is to allow the temporary, unpacked dll to be removed from the filesystem.
Rather than getting more complicated (adding free memory hooks or some such), perhaps it'd be simpler to somehow flag the file that needs to be deleted as no longer being in use, and doing the cleanup on the next startup. That'd leave a few files around, perhaps, but should prevent them from accumulating.
Originally filed at http://java.net/jira/browse/JNA-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315115#action_315115.
The only reason for the win32-specific shutdown hook is to allow the temporary, unpacked dll to be removed from the filesystem.
Rather than getting more complicated (adding free memory hooks or some such), perhaps it'd be simpler to somehow flag the file that needs to be deleted as no longer being in use, and doing the cleanup on the next startup. That'd leave a few files around, perhaps, but should prevent them from accumulating.