[Top][All Lists]

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

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

From: Benjamin Wolsey
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r9668: Plug leak.
Date: Thu, 04 Sep 2008 19:41:39 +0200

> 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();
> }

Generally I like it (although it should of course take the vector by
reference), but it only works for vectors, and not other types of
container. There also has pointers in queues and lists.


Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

reply via email to

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