On Tue, 17 Jan 2012 09:55:03 -0200 Gustavo Sverzut Barbieri <[email protected]> said:
> On Tue, Jan 17, 2012 at 9:02 AM, Carsten Haitzler <[email protected]> > wrote: > > On Fri, 6 Jan 2012 17:48:59 +0900 Hyoyoung Chang <[email protected]> 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. i explained it. -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
