[vlc-devel] commit: Qt4: store input_item_t* in plitem and handle metadata in model ( Ilkka Ollakka )
remi at remlab.net
Fri Aug 14 18:07:18 CEST 2009
----- Message d'origine -----
> 2009/8/14 Rémi Denis-Courmont <remi at remlab.net>
> > And what are you suggesting?
> I have stated my two suggestions: either we always check if the target
> address of the pointer can be found from the playlist root down,
Slow and buggy. Pointers can be recycled by the heap allocator so you could get false matches for a deleted item...
> always take care to correct playlist_item's internal pointers (which I hope
> I succeeded to show is not so very common and obvious in practice).
Yes... As with objects it might be painful but it is The Right Thing(tm).
> That's why I think using the pointers to items directly is cool, because the
> system takes care itself that a newly allocated memory will never overlap an
> already allocated one, hence a pointer to an item will point to it and only
> it as long as the item is not freed. I see pointers as the best handles you
> can have. Only you have to do reference counting then.
Exactly. But that is what Pierre and I have been saying from the beginning;)
> By the way, should it be a parent item who raises reference count on an item
> when it becomes it's child? or should there be one reference number on every
> playlist item per interface, per user so to speak or maybe per thread? Or
Dunno, whatever works is fine with me.
More information about the vlc-devel