On Sun, Jun 10, 2012 at 8:14 PM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
> Edje load: Although we don't use them that much, we have refcounts in evas.
>
>  Don't assume an evas_object_del has to delete the object.

Woot ? Why would the sub object of Edje object be refcounted ? Only
Edje is alloed to play with them !

> Author:       tasn
> Date:         2012-06-10 04:14:42 -0700 (Sun, 10 Jun 2012)
> New Revision: 71895
> Trac:         http://trac.enlightenment.org/e/changeset/71895
>
> Modified:
>  trunk/edje/src/lib/edje_load.c trunk/edje/src/lib/edje_private.h 
> trunk/edje/src/lib/edje_util.c
>
> Modified: trunk/edje/src/lib/edje_load.c
> ===================================================================
> --- trunk/edje/src/lib/edje_load.c      2012-06-10 08:43:49 UTC (rev 71894)
> +++ trunk/edje/src/lib/edje_load.c      2012-06-10 11:14:42 UTC (rev 71895)
> @@ -1234,7 +1234,7 @@
>      }
>
>    if (ed->L) _edje_lua2_script_shutdown(ed);
> -   while (ed->subobjs) evas_object_del(ed->subobjs->data);
> +   while (ed->subobjs) _edje_subobj_unregister(ed, ed->subobjs->data);
>    if (ed->table_parts) free(ed->table_parts);
>    ed->table_parts = NULL;
>    ed->table_parts_size = 0;
>
> Modified: trunk/edje/src/lib/edje_private.h
> ===================================================================
> --- trunk/edje/src/lib/edje_private.h   2012-06-10 08:43:49 UTC (rev 71894)
> +++ trunk/edje/src/lib/edje_private.h   2012-06-10 11:14:42 UTC (rev 71895)
> @@ -2115,6 +2115,7 @@
>  void _edje_lib_unref(void);
>
>  void _edje_subobj_register(Edje *ed, Evas_Object *ob);
> +void _edje_subobj_unregister(Edje *ed, Evas_Object *ob);
>
>  void _edje_multisense_init(void);
>  void _edje_multisense_shutdown(void);
>
> Modified: trunk/edje/src/lib/edje_util.c
> ===================================================================
> --- trunk/edje/src/lib/edje_util.c      2012-06-10 08:43:49 UTC (rev 71894)
> +++ trunk/edje/src/lib/edje_util.c      2012-06-10 11:14:42 UTC (rev 71895)
> @@ -5225,9 +5225,7 @@
>  _cb_subobj_del(void *data, __UNUSED__ Evas *e, Evas_Object *obj, __UNUSED__ 
> void *event_info)
>  {
>    Edje *ed = data;
> -   ed->subobjs = eina_list_remove(ed->subobjs, obj);
> -   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_DEL,
> -                                       _cb_subobj_del, ed);
> +   _edje_subobj_unregister(ed, obj);
>  }
>
>  void
> @@ -5238,4 +5236,12 @@
>                                   _cb_subobj_del, ed);
>  }
>
> +void
> +_edje_subobj_unregister(Edje *ed, Evas_Object *obj)
> +{
> +   ed->subobjs = eina_list_remove(ed->subobjs, obj);
> +   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_DEL,
> +                                       _cb_subobj_del, ed);
> +}
> +
>  /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>



-- 
Cedric BAIL

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to