Fix memory leak in Python IDproperty iterator
Looping over IDProperty keys or calling iteritems leaked memory.
Error in original Python idproperty support from
8768707610
This commit is contained in:
parent
b779fae993
commit
1555809480
Notes:
blender-bot
2023-02-14 07:31:34 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -764,7 +764,6 @@ static PyObject *BPy_IDGroup_iter(BPy_IDProperty *self)
|
|||
iter->group = self;
|
||||
iter->mode = IDPROP_ITER_KEYS;
|
||||
iter->cur = self->prop->data.group.first;
|
||||
Py_XINCREF(iter);
|
||||
return (PyObject *)iter;
|
||||
}
|
||||
|
||||
|
@ -937,7 +936,6 @@ static PyObject *BPy_IDGroup_iter_items(BPy_IDProperty *self)
|
|||
iter->group = self;
|
||||
iter->mode = IDPROP_ITER_ITEMS;
|
||||
iter->cur = self->prop->data.group.first;
|
||||
Py_XINCREF(iter);
|
||||
return (PyObject *)iter;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue