[vlc-devel] commit: Fix memleak (should fix #1081) ( Rémi Duraffort )
pdherbemont at free.fr
Mon Aug 25 09:33:21 CEST 2008
On Aug 25, 2008, at 8:00 AM, Rémi Denis-Courmont wrote:
> On Mon, 25 Aug 2008 01:32:02 +0200, Pierre d'Herbemont
> <pdherbemont at free.fr> wrote:
>> The patch is wrong anyway: strangely in_block ownership goes to the
>> packetizer. IMO, we don't have refcounting for block, and that
>> seem right. And that convention is really counter intuitive. (and
>> prone to leak)
> We cannot have reference counting for blocks, because blocks are
> downstream. The only thing we have is block_Duplicate, which is of
> slow: malloc + memcpy.
No. The whole point of refcount is when to destroy it. Not to make
sure it won't change if you pass it to a function.
> In other words, if we want reference counting for blocks, we need to
> rewrite just about every single code path using blocks. Useful but
> humongous work.
More information about the vlc-devel