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: Thu, 4 Sep 2008 01:36:12 -0700 (PDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)



On Thu, 4 Sep 2008, Benjamin Wolsey wrote:

´╗┐std::for_each(_audioQueue.begin(), _audioQueue.end(),
&pointerDeleter<AudioQueue>);


How do you like the following:

template <typename T>
void
delete_ptr_vector(std::vector<T*> vec)
{
  std::for_each(vec.begin(), vec.end(), boost::checked_deleter<T>());
  vec.clear();
}


And then you would simply call delete_ptr_vector(_audioQueue).

Bastiaan

reply via email to

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