Skip to content

Conversation

@mmokko
Copy link
Collaborator

@mmokko mmokko commented Jun 19, 2023

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.

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.

2 participants