aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/libpyside/pysideproperty.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pysideproperty.cpp b/sources/pyside6/libpyside/pysideproperty.cpp
index 22bfa7f30..a4f90b8fd 100644
--- a/sources/pyside6/libpyside/pysideproperty.cpp
+++ b/sources/pyside6/libpyside/pysideproperty.cpp
@@ -67,6 +67,7 @@ static PyType_Slot PySidePropertyType_slots[] = {
{Py_tp_init, reinterpret_cast<void *>(qpropertyTpInit)},
{Py_tp_new, reinterpret_cast<void *>(qpropertyTpNew)},
{Py_tp_getset, PySidePropertyType_getset},
+ {Py_tp_del, reinterpret_cast<void *>(PyObject_GC_Del)},
{0, nullptr}
};
@@ -235,6 +236,7 @@ static void qpropertyDeAlloc(PyObject *self)
// This was not needed before Python 3.8 (Python issue 35810)
Py_DECREF(Py_TYPE(self));
}
+ PyObject_GC_UnTrack(self);
Py_TYPE(self)->tp_free(self);
}