I have an object in the heap and a reference to it. There are certain circumstances in which the object gets deleted but the reference that points to its location doesn\'t k
For the PySide objects you'll need the shiboken module to perform object queries.
PySide
shiboken
Visit the shiboken module documention:
import shiboken print shiboken.isValid(a)