gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] /srv/bzr/gnash/trunk r9668: Plug leak.


From: Bastiaan Jacques
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r9668: Plug leak.
Date: Wed, 3 Sep 2008 14:13:53 -0700 (PDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)



On Wed, 3 Sep 2008, Benjamin Wolsey wrote:

   timestamp: Wed 2008-09-03 18:50:45 +0200
   message:
     Delete audio queue data in NetStreamFfmpeg dtor.
   modified:
     libcore/asobj/NetStreamFfmpeg.cpp
     libcore/asobj/NetStreamFfmpeg.h

+ std::for_each(_audioQueue.begin(), _audioQueue.end(), &cleanQueue);

In a slightly more generalised fashion, you could also write:

  std::for_each(_audioQueue.begin(), _audioQueue.end(), 
boost::checked_deleter<media::raw_mediadata_t>());

Although of course that line is uncomfortably long. On the other hand,
since this is a very common algorithm for Gnash, perhaps we should just
write a method specifically for deleting every member in a vector (which
would end up being shorter). :)

Bastiaan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]