[issue14597] Cannot unload dll in ctypes until script exits

Mark Mikofski report at bugs.python.org
Mon Feb 15 15:12:31 EST 2016


Mark Mikofski added the comment:

I think I have this issue even after interpreter exits. My setup.py creates a .dll then later loads the dll for testing using ctypes. Subsequent runs of setup.py that would force rebuilding the .dll attempt to delete the old dll first if it exists, but I get permission denied.

Oddly, if I put the load library call inside a function, then, after exiting the interpreter the dll can be deleted.

Windos 7 x64
Python 2.7.10

Sorry if this is by design, a Windows feature, unrelated or the wrong issue. I search SO and these bugs, and only found answers related to unloading dll during script.

----------
nosy: +bwanamarko

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14597>
_______________________________________


More information about the Python-bugs-list mailing list