Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
6.x
-
None
Description
Following the example in the pyside docs, a strong reference appears to be held somewhere. when you include gc.set_debug as shown above, you can that uncollectable objects remain at cleanup. PyQt6.QtCore.pyqtProperty does not have the same issue.
from PySide6.QtCore import QObject, Property # this has uncollectable objects # from PyQt6.QtCore import QObject, pyqtProperty as Property # this works import gc gc.set_debug(gc.DEBUG_UNCOLLECTABLE) class MyObject(QObject): @Property(int) def pp(self): pass
gc: uncollectable <PySide6.QtCore.Property 0x000002E60CF4AE00> gc: uncollectable <function 0x000002E61D95CDC0> gc: uncollectable <dict 0x000002E60CF241C0> gc: uncollectable <SourceFileLoader 0x000002E60CF0C9A0> gc: uncollectable <module 0x000002E61E429120> gc: uncollectable <Shiboken.ObjectType 0x000002E61DBEB9A0> gc: uncollectable <dict 0x000002E61E426F80> gc: uncollectable <dict 0x000002E60CF24440> gc: uncollectable <tuple 0x000002E61E429080> gc: uncollectable <tuple 0x000002E60CF4BF40> gc: uncollectable <ModuleSpec 0x000002E61E420A90> gc: uncollectable <builtin_function_or_method 0x000002E61E429170> gc: uncollectable <builtin_function_or_method 0x000002E61E4291C0> gc: uncollectable <builtin_function_or_method 0x000002E61E429210> gc: uncollectable <builtin_function_or_method 0x000002E61E429260> gc: uncollectable <builtin_function_or_method 0x000002E61E4292B0> gc: uncollectable <builtin_function_or_method 0x000002E61E429300> gc: uncollectable <builtin_function_or_method 0x000002E61E429350> gc: uncollectable <builtin_function_or_method 0x000002E61E4293A0> gc: uncollectable <builtin_function_or_method 0x000002E61E4293F0> gc: uncollectable <builtin_function_or_method 0x000002E61E429440> gc: uncollectable <builtin_function_or_method 0x000002E61E429490> gc: uncollectable <builtin_function_or_method 0x000002E61E4294E0> gc: uncollectable <builtin_function_or_method 0x000002E61E429530> gc: uncollectable <builtin_function_or_method 0x000002E61E429580> gc: uncollectable <builtin_function_or_method 0x000002E61E4295D0> gc: uncollectable <builtin_function_or_method 0x000002E61E429620> gc: uncollectable <builtin_function_or_method 0x000002E61E429670> gc: uncollectable <builtin_function_or_method 0x000002E61E4296C0> gc: uncollectable <PySide6.QtCore.QMetaObject 0x000002E60CF7F940> gc: uncollectable <dict 0x000002E60CF244C0> [<PySide6.QtCore.Property object at 0x000002E60CF4AE00>]
Attachments
Issue Links
- relates to
-
PYSIDE-1321 Assigning QtCore.Property to Python variable leaks memory
- Closed
-
PYSIDE-1402 QtCore.Property is out of date
- Closed
-
PYSIDE-1617 Fix memory leaks in Shiboken
- Open