enh: #3890: Get rid of SingletonHolder

This commit is contained in:
Günter Obiltschnig
2024-01-30 09:56:27 +01:00
parent 33638df51e
commit d5a5ebc2d7
23 changed files with 44 additions and 168 deletions

View File

@@ -17,7 +17,6 @@
#include "Poco/Exception.h"
using Poco::SingletonHolder;
using Poco::FastMutex;
using Poco::NotFoundException;
using Poco::ExistsException;
@@ -137,15 +136,10 @@ void HTTPSessionFactory::setProxyConfig(const HTTPClientSession::ProxyConfig& pr
}
namespace
{
static SingletonHolder<HTTPSessionFactory> singleton;
}
HTTPSessionFactory& HTTPSessionFactory::defaultFactory()
{
return *singleton.get();
static HTTPSessionFactory f;
return f;
}

View File

@@ -19,7 +19,6 @@
#include "Poco/SharedLibrary.h"
#include "Poco/SingletonHolder.h"
#include "Poco/UnicodeConverter.h"
#include <vector>
#define WIN32_LEAN_AND_MEAN
@@ -227,15 +226,10 @@ private:
};
namespace
{
static Poco::SingletonHolder<SSPINTLMProvider> sspintlmProviderHolder;
}
SSPINTLMProvider& SSPINTLMProvider::instance()
{
return *sspintlmProviderHolder.get();
static SSPINTLMProvider p;
return p;
}