Index: pyatspi/accessible.py
===================================================================
--- pyatspi/accessible.py	(revision 969)
+++ pyatspi/accessible.py	(working copy)
@@ -589,14 +633,30 @@
     target.ref()
     return target._narrow(Accessibility.Accessible)
 
+class _UnrefMixin(object):
+  '''
+  This mixin addresses the issue we have with unreferencing non-primitives.
+  '''
+  def __del__(self):
+    '''
+    Unrefence the instance when Python GCs it. Why do we need this twice?
+    '''
+    try:
+      self.unref()
+    except Exception:
+      pass
+
 # 1. mix the exception handlers into all queryable interfaces
 map(_mixExceptions, constants.ALL_INTERFACES)
 # 2. mix the exception handlers into other Accessibility objects
 map(_mixExceptions, [Accessibility.StateSet])
 # 3. mix the new functions
 _mixClass(Accessibility.Accessible, _AccessibleMixin,
-          ['_get_name', '_get_description'])
+          ['_get_name', '_get_description', '_get_parent'])
 # 4. mix queryInterface convenience methods
 _mixInterfaces(Accessibility.Accessible, constants.ALL_INTERFACES)
 # 5. mix Relation class
 _mixClass(Accessibility.Relation, _RelationMixin)
+# 6. mix in neccessary unrefs
+map(lambda cls: _mixClass(cls, _UnrefMixin), 
+    (Accessibility.StateSet,Accessibility.Relation))
