Eryk Sun <eryk...@gmail.com> added the comment:
Automatically decrementing the reference count of a shared library (e.g. via WinAPI FreeLibrary or POSIX dlclose) when a CDLL instance is finalized would require significant design changes to ensure that all ctypes pointers, scalars, and aggregates that reference memory in the DLL also always reference the CDLL instance in their _objects attribute. I don't think this feature request is worth the work that involves, or the risk of crashing if some case is overlooked in the implementation. Nothing prevents a script from implementing this manually on a case by case basis. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue14597> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com