Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There has been cases where a python error is raised from the main thread where java-access-bridge-wrapper has been imported. To tackle this it would be safer to manually unload the .dll library to make sure the memory is free and no exceptions from the java application is causing issues in the access bridge user side.
There is unfortunately no direct way to unload or free the loaded .dll library within the same Python process. The library will be unloaded automatically when the Python process terminates.
There is an API in the _ctypes implementation side for freeing a loaded library, but the ctypes library should be considerer as the public API and it doesn't expose it.
I'll leave this PR open if this is needed later to be merged to fix the error cases.