2013/5/7 Carsten Haitzler <ras...@rasterman.com> > 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. > > > > 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. > > > > 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. > > > > 3. All application fix their own to set all callbacks as NULL before > > unloaded. > > But this seems to be workaround for application. > > > > 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? > > #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. >
Okay, I see. If app. use class longer, app. should decide timing to call item_free function. Also for the case such as module, app. can set the callbacks as NULL before unloaded. > > > 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 > > -- 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