
7 Jan
2013
7 Jan
'13
8:30 a.m.
In message <50EA0D46.8080100@boost-consulting.com>, Joel de Guzman <djowel@gmail.com> writes
On 1/7/13 2:04 AM, Mathieu Champlon wrote:
On 06/01/2013 01:40, Joel de Guzman wrote:
template <typename T> recursive_wrapper<T>::~recursive_wrapper() { if (p_) boost::checked_delete(p_); , }
Hi,
Maybe I missed something but why would you test for p_ in the destructor ? Isn't boost::checked_delete< T >( 0 ) valid ?
You are right. The check is not needed.
But is there an expected performance benefit? Regards, -- Alec Ross