Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add shutdown detection to ObjectRef __del__ method.
On older Pythons (<3.4) the shutdown sequence sets globals etc to None to help gc. This means that the calling of a global as part of `__del__` as occurs in `ffi::ObjectRef` leads to error messages like: `Exception TypeError: "'NoneType' object is not callable" in...` Using the already existing shutdown detection mechanism in the `__del__` it's possible to avoid calling the global and as a result stops these message/calling None. The LLVM object will leak either way, at least this way is leaks quietly. Fixes #350 Fixes numba/numba#2818
- Loading branch information