diff options
Diffstat (limited to 'sources/pyside6/libpyside/pysideproperty.cpp')
-rw-r--r-- | sources/pyside6/libpyside/pysideproperty.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pysideproperty.cpp b/sources/pyside6/libpyside/pysideproperty.cpp index 5e68253d8..b9f788b61 100644 --- a/sources/pyside6/libpyside/pysideproperty.cpp +++ b/sources/pyside6/libpyside/pysideproperty.cpp @@ -103,6 +103,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} }; @@ -271,6 +272,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); } |