[vlc-devel] commit: Fix memleak (should fix #1081) ( Rémi ?Duraffort )

Pierre d'Herbemont pdherbemont at free.fr
Mon Aug 25 09:34:42 CEST 2008

On Aug 25, 2008, at 8:05 AM, Rémi Denis-Courmont wrote:

> On Mon, 25 Aug 2008 02:09:11 +0200, Pierre d'Herbemont
> <pdherbemont at free.fr> wrote:
>> Passing ownership to caller is counter intuitive. But I guess fixing
>> that properly would mean implementing refcounting.
> Passing ownership to a caller is what you always (sort of) do when  
> you give
> a non-const reference to anything. We can argue that the buffer  
> management
> in VLC is too inflexible. Indeed, it does not handle sharing  
> buffers. But
> the calling convention looks pretty sane to me. In the Linux kernel,  
> you
> also give a reference to the sk_buff when you invoke someone's else
> callback... Frankly, I cannot see how anything could work (in a
> multi-tasked programming environment) other than this way.

It could work fine of course :) But I was just saying that this was an  
ideal solution, not that we can implement it.

More information about the vlc-devel mailing list