- Code: Select all
(Notice the _seq(0) at the end)
I found this bug by running code under valgrind which complains about uninitialised variables being read. Might I suggest that valgrind is used as part of the standard build process for Poco. I have tried running it on some of the ter st suites and there are a number of memory leaks. This appears to be because of using raw pointers instead of smart pointers in a number of functions:. For instance, Poco::ThreadPool::createThread() returns a raw pointer instead of auto_ptr or shared_ptr.
HTTPServerTest::testKeepAliveTimeout() could use and auto_ptr to avoid a leak or allocate HTTPServerParams on the stack if it didn't have a protected destructor. The answer in a previous post that these classes should be used with Poco::AutoPtr seems not to be borne out in practice.