diff --git a/ophyd/ophydobj.py b/ophyd/ophydobj.py index 471ffedd6..ffbc3ab5e 100644 --- a/ophyd/ophydobj.py +++ b/ophyd/ophydobj.py @@ -166,6 +166,7 @@ def __init__(self, *, name=None, attr_name="", parent=None, labels=None, kind=No raise ValueError("name must be a string.") self._name = name self._parent = parent + self._destroyed = False # dictionary of wrapped callbacks self._callbacks = {k: {} for k in self.subscriptions} @@ -345,6 +346,7 @@ def connected(self): def destroy(self): """Disconnect the object from the underlying control layer""" self.unsubscribe_all() + self._destroyed = True @property def parent(self):