diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-10-21 13:57:34 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:07:22 -0300 |
commit | 73e14b9ccf9bcf6df28a98d0ef03a71eeecedb97 (patch) | |
tree | 8e83dc0da747ae1525d3768d9cb8800864ed4b17 /libshiboken | |
parent | 5df9dc0a62744507d1cfcf6c77bb9781223eaadd (diff) |
Remove pydict ref leak on pyenum.cpp.
Diffstat (limited to 'libshiboken')
-rw-r--r-- | libshiboken/pyenum.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libshiboken/pyenum.cpp b/libshiboken/pyenum.cpp index baa560873..6295c9150 100644 --- a/libshiboken/pyenum.cpp +++ b/libshiboken/pyenum.cpp @@ -108,6 +108,7 @@ SbkEnumObject_New(PyTypeObject *type, long item_value, const char* item_name) if (!values) { values = PyDict_New(); PyDict_SetItemString(type->tp_dict, const_cast<char*>("values"), values); + Py_DECREF(values); // ^ values still alive, because setitemstring incref it } PyDict_SetItemString(values, item_name, enum_obj); } |