SF# 3379935 - fixed memory leak

This commit is contained in:
Marian Krivos 2011-08-17 07:17:54 +00:00
parent 51db1d296c
commit 50fddbd3e8

View File

@ -449,8 +449,16 @@ PooledThread* ThreadPool::getThread()
if (_threads.size() < _maxCapacity)
{
pThread = createThread();
pThread->start();
_threads.push_back(pThread);
try
{
pThread->start();
_threads.push_back(pThread);
}
catch(SystemException& e)
{
delete pThread;
throw;
}
}
else throw NoThreadAvailableException();
}