aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/sbkenum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/libshiboken/sbkenum.cpp')
-rw-r--r--sources/shiboken2/libshiboken/sbkenum.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/sources/shiboken2/libshiboken/sbkenum.cpp b/sources/shiboken2/libshiboken/sbkenum.cpp
index 009d9ab2f..0902077ed 100644
--- a/sources/shiboken2/libshiboken/sbkenum.cpp
+++ b/sources/shiboken2/libshiboken/sbkenum.cpp
@@ -487,12 +487,7 @@ bool createGlobalEnumItem(PyTypeObject* enumType, PyObject* module, const char*
if (enumItem) {
if (PyModule_AddObject(module, itemName, enumItem) < 0)
return false;
- // @TODO This Py_DECREF causes crashes on exit with a debug Python interpreter, essentially
- // causing a use-after-free in the GC. This is now commented out to cause a memory leak
- // instead of a crash. Proper memory management of Enum types and items should be
- // implemented. See PYSIDE-488. This will require proper allocation and deallocation of
- // the underlying Enum PyHeapType, which is currently just deallocated at application exit.
- // Py_DECREF(enumItem);
+ Py_DECREF(enumItem);
return true;
}
return false;