Boost Users :
Subject: Re: [Boost-users] [Boost.Test] valgrind complains about invalid reads
From: Scott Banachowski (sbanacho_at_[hidden])
Date: 2009-12-16 21:50:30
I agree with Peter here, the destructor for test_unit should be virtual. I find that it is being deleted when test_unit* is a stored in reference counted pointer, and at program exit it is being deleted by calling ~test_unit(). If you use a derived class (test_suite), this is leading to an error.
Also, in the code I'm looking at (1.40.0), the test_suite class has a virtual destructor, but its base class test_unit does not. Not making the base class virtual seems to be defeating the purpose.
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