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

Rémi Denis-Courmont rdenis at simphalempin.com
Mon Aug 25 08:00:28 CEST 2008


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 doesn't  
> seem right. And that convention is really counter intuitive. (and  
> prone to leak)

We cannot have reference counting for blocks, because blocks are modified
downstream. The only thing we have is block_Duplicate, which is of course
slow: malloc + memcpy.

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.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list