[vlc-devel] Re: vlc: svn commit r20620 (pdherbemont)

Damien Fouilleul damien.fouilleul at laposte.net
Tue Jun 19 11:16:51 CEST 2007


Subversion daemon wrote:
> r20620 | pdherbemont | 2007-06-18 21:58:16 +0200 (Mon, 18 Jun 2007) | 2 lines
> Changed paths:
>    M /trunk/mozilla/control/npolibvlc.cpp
>
> Mozilla: Attempt to match libvlc input to media_instance changes.
>
>  > http://trac.videolan.org/vlc/changeset/20620
>
>   
hmm, i don't like 'libvlc_media_instance_destroy_and_detach' name and 
what it does, it's actually not what libvlc_input _free() did, as the 
latter only freeed the memory related to the libvlc_input object, not 
the input object itself.
Could you also use proper OO semantics as well, 
libvlc_media_instance_destroy_and_detach means absolutely nothing to the 
'casual' programmer; try pairing 'get' calls with a matching 'release', 
as most OO language do. you could also use reference counting,i.e:

for the first get:
- create object, set refcount to 1
for further gets:
- increase refcount, return existing object

for each release,
- descrease refcount, if recount is 0, distroy object

Damien

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list