mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +01:00
SF# 3379935 - fixed memory leak
This commit is contained in:
parent
51db1d296c
commit
50fddbd3e8
@ -449,8 +449,16 @@ PooledThread* ThreadPool::getThread()
|
|||||||
if (_threads.size() < _maxCapacity)
|
if (_threads.size() < _maxCapacity)
|
||||||
{
|
{
|
||||||
pThread = createThread();
|
pThread = createThread();
|
||||||
pThread->start();
|
try
|
||||||
_threads.push_back(pThread);
|
{
|
||||||
|
pThread->start();
|
||||||
|
_threads.push_back(pThread);
|
||||||
|
}
|
||||||
|
catch(SystemException& e)
|
||||||
|
{
|
||||||
|
delete pThread;
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else throw NoThreadAvailableException();
|
else throw NoThreadAvailableException();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user