diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-02-19 17:10:24 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-02-23 16:35:40 -0300 |
commit | 75b7afbd63be9b27d3bd964891720e8c16079280 (patch) | |
tree | f56e9d83a73bff0119333649521663f5c45aad20 /tests/qtcore | |
parent | ab738e07d2cffc0fc9692ecc3a5f830847b853bb (diff) |
Fixed memory leak on callbacks used on signal connection.
Now using the 'destroyed()' signal the reference is cleaned after source
object destroyed.
Diffstat (limited to 'tests/qtcore')
-rw-r--r-- | tests/qtcore/qobject_protected_methods_test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qtcore/qobject_protected_methods_test.py b/tests/qtcore/qobject_protected_methods_test.py index 37bda37bc..530b870a2 100644 --- a/tests/qtcore/qobject_protected_methods_test.py +++ b/tests/qtcore/qobject_protected_methods_test.py @@ -23,7 +23,7 @@ class QObjectReceivers(unittest.TestCase): self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 0) QObject.connect(obj, SIGNAL("destroyed()"), self.cb) - self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 1) + self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 0) def testQThreadReceiversExtern(self): #QThread.receivers() - Inherited protected method @@ -31,7 +31,7 @@ class QObjectReceivers(unittest.TestCase): obj = QThread() self.assertEqual(obj.receivers(SIGNAL('destroyed()')), 0) QObject.connect(obj, SIGNAL("destroyed()"), self.cb) - self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 1) + self.assertEqual(obj.receivers(SIGNAL("destroyed()")), 0) if __name__ == '__main__': |