diff options
-rw-r--r-- | bindings/python/llvm/common.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bindings/python/llvm/common.py b/bindings/python/llvm/common.py index 9911e69..0c5fcd0 100644 --- a/bindings/python/llvm/common.py +++ b/bindings/python/llvm/common.py @@ -58,6 +58,9 @@ class LLVMObject(object): return self._as_parameter_ def __del__(self): + if not hasattr(self, '_self_owned') or not hasattr(self, '_disposer'): + return + if self._self_owned and self._disposer: self._disposer(self) |