On Tue, Jan 17, 2012 at 9:02 AM, Carsten Haitzler <ras...@rasterman.com> wrote: > On Fri, 6 Jan 2012 17:48:59 +0900 Hyoyoung Chang <hyoyo...@gmail.com> said: > > ok - i dont like passing all tyhe funcs as params. please do it this way: > > EAPI Elm_Genlist_Item_Class *elm_genlist_item_class_new(void); > EAPI void > elm_genlist_item_class_free(Elm_Genlist_Item_Class > *itc); > EAPI void elm_genlist_item_class_ref(Elm_Genlist_Item_Class > *itc); > EAPI void > elm_genlist_item_class_unref(lm_Genlist_Item_Class > *itc); > > now ADD a version field to the top of the current item class and a refcount > number. ref and unref just add and sub from the refcount number - as does free > (free can just call unref - i'm only adding it to pair with new). new just > calloc()'s the item class struct and fills in version # and sets refcount to > 1. > if ref goes to 0 then free the class. > > now... every genlist item that uses this class should ref() the class.every > item from a genlist thats deleted should unref() it. now the issue ca be > solved > by unref or free()ing the item classes u created for use in the gnelist on del > of the genlist obj (u can attach a del callback). they will not be freed then > until refs hit 0, but on obj del they can set func ptr's to null thus making > it > safe.
Excellent, then you broke all my applications that PROPERLY uses static const memory for item class. For some strange reason that nobody can explain. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel