On Wed, May 8, 2013 at 11:25 AM, Bluezery <ohpo...@gmail.com> wrote:
> 2013/5/7 Daniel Juyung Seo <seojuyu...@gmail.com>
>
>> Hello,
>>
>> On Tue, May 7, 2013 at 6:47 PM, Carsten Haitzler <ras...@rasterman.com>
>> wrote:
>> > On Tue, 7 May 2013 17:32:05 +0900 Bluezery <ohpo...@gmail.com> said:
>> >
>> >> Hello,
>> >>
>> >> I have query abount elm_genlist_item_class_new/free/unref.
>> >>
>> >> Elm_Genlist_Item_Class is user created memory and referred by genlist
>> >> object.
>>
>> Well, no. When we use elm_genlist_item_class_new(), item class is
>> created by genlist and managed by genlist even though application call
>> the API.
>> That was the whole point of that API or application could mis-manage
>> item class life cycle.
>>
>> >>
>> >> But sometimes application want to do not use it anymore.
>> >> So there is just one option to do this, it is to call
>> >> elm_genlist_item_class_free.
>> >> Evenghough, Item Class callbacks can be called because genlist refer the
>> >> Item Class yet. Moreover, if application is module,  application can
>> crash
>> >> after module is unloaded.
>> >>
>> >> There is two options:
>> >> 1.I can add new API to do this.elm_genlist_item_class_free2 or
>> something.
>> >> This is easy way but should be deprecaed later.
>> >>
>>
>> If you really want, this can be elm_genlist_item_class_del() or
>> something not like free2.
>>
>> >> 2. In elm_genlist_item_class_free(), all calbacks can be NULL because
>> the
>> >> name is too intuitive for application. But this will break ABI and also
>> >> genlist example in elementary should be changed.
>>
>> Yes ABI break. So vetoed!
>>
>> >>
>> >> 3. All application fix their own to set all callbacks as NULL before
>> >> unloaded.
>> >> But this seems to be workaround for application.
>>
>> This looks weird to me. Why apps change the callbacks on a run-time?
>> They can set a flag and just return from the callbacks.
>>
>> >>
>> >> I like option 2. So I suggest how about above fix be added at the time
>> when
>> >> 1.8 is released. I think that this weired API usage should be fixed
>> ASAP.
>> >> Or after 2.0?
>>
>> Well API/ABI/Theme break will not happen before 2.0.
>> 2.0 will happen around 2016-2017.
>> You can update the "EFL 2.0 TODO" document beforehand.
>> https://phab.enlightenment.org/w/efl_2.0_todo/
>>
>> >
>> > #3.
>> >
>> > free frees, but the class is refcounted.. so it stays around and alive
>> as long
>> > as items need it. they all point to it.
>>
>> Well yeah. #3 can be done from the application side.
>> But I prefer #1 to #2 and #3. The new API should be used only when it's
>> needed.
>>
>
> okay, adding new API can be workaround so I guided #3 to whole apllications.
> #3 seems to be no harmful after API usage is changed later (after 2.0).
>

Well I don't mind but I still prefer #1 :)
In #1, the new API will just do the same job which applications have
to do in #3.

Daniel Juyung Seo (SeoZ)

> Thanks.
>
>
>>
>> Thank.
>>
>> Daniel Juyung Seo (SeoZ)
>>
>> >
>> >> Thanks
>> >>
>> >> --
>> >> BRs,
>> >> Kim.
>> >>
>> ------------------------------------------------------------------------------
>> >> Learn Graph Databases - Download FREE O'Reilly Book
>> >> "Graph Databases" is the definitive new guide to graph databases and
>> >> their applications. This 200-page book is written by three acclaimed
>> >> leaders in the field. The early access version is available now.
>> >> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
>> >> _______________________________________________
>> >> enlightenment-devel mailing list
>> >> enlightenment-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> >>
>> >
>> >
>> > --
>> > ------------- Codito, ergo sum - "I code, therefore I am" --------------
>> > The Rasterman (Carsten Haitzler)    ras...@rasterman.com
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Learn Graph Databases - Download FREE O'Reilly Book
>> > "Graph Databases" is the definitive new guide to graph databases and
>> > their applications. This 200-page book is written by three acclaimed
>> > leaders in the field. The early access version is available now.
>> > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
>> > _______________________________________________
>> > enlightenment-devel mailing list
>> > enlightenment-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and
>> their applications. This 200-page book is written by three acclaimed
>> leaders in the field. The early access version is available now.
>> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
>> _______________________________________________
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
>
> --
> BRs,
> Kim.
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to