kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=a11fadc82df6155c3cefde17effffe683ac72c59
commit a11fadc82df6155c3cefde17effffe683ac72c59 Author: Kai Huuhko <kai.huu...@gmail.com> Date: Tue Mar 10 00:04:28 2015 +0200 Evas.SmartObject: Handle object deletion in a saner way Evas free event gets called last, we free resources there so that the SO callbacks can call with a valid object reference. --- efl/evas/efl.evas_object_smart.pxi | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/efl/evas/efl.evas_object_smart.pxi b/efl/evas/efl.evas_object_smart.pxi index 4cc7af5..988dd09 100644 --- a/efl/evas/efl.evas_object_smart.pxi +++ b/efl/evas/efl.evas_object_smart.pxi @@ -49,13 +49,6 @@ cdef void _smart_object_delete(Evas_Object *o) with gil: except Exception: traceback.print_exc() - # eo_do(self.obj, - # eo_event_callback_del(EO_EV_DEL, _eo_event_del_cb, <const void *>self)) - eo_do(o, eo_key_data_del("python-eo")) - #evas_object_smart_data_set(obj.obj, NULL) - obj.obj = NULL - Py_DECREF(obj) - cdef void _smart_object_move(Evas_Object *o, Evas_Coord x, Evas_Coord y) with gil: cdef: @@ -617,8 +610,8 @@ cdef class SmartObject(Object): self.obj = obj eo_do(self.obj, eo_key_data_set("python-eo", <void *>self, NULL)) - # eo_do(self.obj, - # eo_event_callback_add(EO_EV_DEL, _eo_event_del_cb, <const void *>self)) + evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE, + obj_free_cb, <void *>self) Py_INCREF(self) return 1 --