kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=1189e17fe0cd159190ebb6ae9b7a7f3dc9caee0b
commit 1189e17fe0cd159190ebb6ae9b7a7f3dc9caee0b Author: Kai Huuhko <kai.huu...@gmail.com> Date: Tue Feb 2 21:41:37 2016 +0200 Elm.FileSelector: Fix ref leak --- efl/elementary/fileselector.pxi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/efl/elementary/fileselector.pxi b/efl/elementary/fileselector.pxi index a861bfb..77ef2d7 100644 --- a/efl/elementary/fileselector.pxi +++ b/efl/elementary/fileselector.pxi @@ -34,6 +34,8 @@ cdef class Fileselector(LayoutClass): """ + cdef list _custom_filters + def __init__(self, evasObject parent, *args, **kwargs): """Fileselector(...) @@ -45,6 +47,7 @@ cdef class Fileselector(LayoutClass): """ self._set_obj(elm_fileselector_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) + self._custom_filters = list() property is_save: """Enable/disable the file name entry box where the user can type @@ -351,9 +354,7 @@ cdef class Fileselector(LayoutClass): """ cb_data = (func, data) - # FIXME: This is now a ref leak. It should be stored somewhere and - # deleted in the remove method. - Py_INCREF(cb_data) + self._custom_filters.append(cb_data) if isinstance(filter_name, unicode): filter_name = PyUnicode_AsUTF8String(filter_name) elm_fileselector_custom_filter_append(self.obj, @@ -373,6 +374,7 @@ cdef class Fileselector(LayoutClass): .. versionadded:: 1.8 """ + del self._custom_filters[:] elm_fileselector_filters_clear(self.obj) property hidden_visible: --