Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free the loaded library at shutdown #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant