Boost logo

Boost Users :

Subject: [Boost-users] Boost::shared_ptr and CPP_UNIT
From: Barry79 (barry.griffin_at_[hidden])
Date: 2010-11-13 05:50:46


Hi there,

In my unit test I do something like this -

void setup()
{
 m_a = ptr_t(new A());
 m_b = ptr_t(new B(m_a));
 m_c = ptr_t(new C());
 m_b->Register(m_c);
}

void tearDown()
{
}

I was wondering if I should be implementing anything in tearDown (like
calling reset on these shared pointers) where I would normally call delete,
and if so, why?

Thanks,

Barry

-- 
View this message in context: http://boost.2283326.n4.nabble.com/Boost-shared-ptr-and-CPP-UNIT-tp3040738p3040738.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net