-
- Downloads
make sure singletons don't reference any Python objects
The order of destruction of static objects, e.g. singletons is arbitrary and can not be relied upon. For some versions of Python, the singletons are destroyed after Python has shutdown. When objects stored in the singletons have been created in Python, a segfault is produced when they are destroyed, since the destructor assumes a Python interpreter exists. To work around that, we register atexit handlers to remove all references to Python objects. That's required for the IOProfileRegistry and Conopology singletons.
Showing
- modules/conop/pymod/export_conop.cc 15 additions, 1 deletionmodules/conop/pymod/export_conop.cc
- modules/io/pymod/__init__.py 1 addition, 1 deletionmodules/io/pymod/__init__.py
- modules/io/pymod/export_pdb_io.cc 17 additions, 2 deletionsmodules/io/pymod/export_pdb_io.cc
- modules/io/src/mol/io_profile.hh 3 additions, 1 deletionmodules/io/src/mol/io_profile.hh
- modules/io/tests/test_io_pdb.py 8 additions, 0 deletionsmodules/io/tests/test_io_pdb.py
Please register or sign in to comment