diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-10-25 18:12:45 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-10-26 13:49:07 -0300 |
commit | b7f36fec396631cf61ecc801e55df73a2ef55857 (patch) | |
tree | 1e2196a53ba49e35455823841fa539fe8dd2ff58 /tests/signals/leaking_signal_test.py | |
parent | a82deb1de29320159c8614c2c62c96e176d32771 (diff) |
Remove releaseWrapper as Signal tp_dealloc
It was being called when the Signal was garbage
collected, resulting in a segfault.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Reviewer: Renato Filho <renato.filho@openbossa.org>
Diffstat (limited to 'tests/signals/leaking_signal_test.py')
-rw-r--r-- | tests/signals/leaking_signal_test.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/signals/leaking_signal_test.py b/tests/signals/leaking_signal_test.py new file mode 100644 index 000000000..984982d80 --- /dev/null +++ b/tests/signals/leaking_signal_test.py @@ -0,0 +1,16 @@ + +import unittest +from PySide import QtCore +import weakref + +class LeakingSignal(unittest.TestCase): + + def testLeakingSignal(self): + # Was segfaulting when the signal was garbage collected. + class Emitter(QtCore.QObject): + my_signal = QtCore.Signal(object) + + emitter = Emitter() + +if __name__ == '__main__': + unittest.main() |