diff --git a/src/ansys/dpf/core/dpf_operator.py b/src/ansys/dpf/core/dpf_operator.py index 0780091893..e07352ba8a 100644 --- a/src/ansys/dpf/core/dpf_operator.py +++ b/src/ansys/dpf/core/dpf_operator.py @@ -736,10 +736,8 @@ def default_config(name, server=None): def __del__(self): try: - if hasattr(self, "_deleter_func"): - obj = self._deleter_func[1](self) - if obj is not None: - self._deleter_func[0](obj) + if self._internal_obj is not None: + self._deleter_func[0](self._deleter_func[1](self)) except: warnings.warn(traceback.format_exc())