On 8/24/05 7:18 PM, "Gennadiy Rozental"
In that case, why use m_space at all. Instead, just something like the following (which may have stupid syntax errors):
template<typename F> class global_fixture_impl : public global_fixture { virtual void setup() { m_f = new F; }; virtual void teardown() { delete m_f; m_f = 0; }; F* m_f; }
Yes, you right of course ;))
Maybe you could use "auto_ptr" to help (not syntax-checked either): template < typename F > class global_fixture_impl : public global_fixture { virtual void setup() { f.reset( new F ); } virtual void teardown() { f.reset(); } std::auto_ptr<F> f_; }; I'm just interrupting here, so I don't know why you're not using a constructor & destructor pair (i.e. actual RAII) instead of virtual member functions. -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com