mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-14 23:07:56 +02:00
#538 prevent destructors from throwing exceptions
This commit is contained in:
@@ -194,9 +194,16 @@ public:
|
||||
~ObjectPool()
|
||||
/// Destroys the ObjectPool.
|
||||
{
|
||||
for (typename std::vector<P>::iterator it = _pool.begin(); it != _pool.end(); ++it)
|
||||
try
|
||||
{
|
||||
_factory.destroyObject(*it);
|
||||
for (typename std::vector<P>::iterator it = _pool.begin(); it != _pool.end(); ++it)
|
||||
{
|
||||
_factory.destroyObject(*it);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
poco_unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user