mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 13:35:54 +00:00
Wrap IApplication in a ScopedPointer
This commit is contained in:
@@ -8,7 +8,8 @@
|
|||||||
volatile bool doShutdown = false;
|
volatile bool doShutdown = false;
|
||||||
|
|
||||||
// VFALCO TODO Wrap this up in something neater.
|
// VFALCO TODO Wrap this up in something neater.
|
||||||
IApplication* theApp = nullptr;
|
//IApplication* theApp = nullptr;
|
||||||
|
ScopedPointer <IApplication> theApp;
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
|
|
||||||
@@ -461,7 +462,7 @@ void Application::setup ()
|
|||||||
{
|
{
|
||||||
theApp->getHashNodeDB ()->getDB ()->executeSQL (boost::str (boost::format ("PRAGMA cache_size=-%d;") %
|
theApp->getHashNodeDB ()->getDB ()->executeSQL (boost::str (boost::format ("PRAGMA cache_size=-%d;") %
|
||||||
(theConfig.getSize (siHashNodeDBCache) * 1024)));
|
(theConfig.getSize (siHashNodeDBCache) * 1024)));
|
||||||
theApp->getHashNodeDB ()->getDB ()->setupCheckpointing (&mJobQueue);
|
theApp->getHashNodeDB ()->getDB ()->setupCheckpointing (&mJobQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
theApp->getLedgerDB ()->getDB ()->executeSQL (boost::str (boost::format ("PRAGMA cache_size=-%d;") %
|
theApp->getLedgerDB ()->getDB ()->executeSQL (boost::str (boost::format ("PRAGMA cache_size=-%d;") %
|
||||||
@@ -994,3 +995,4 @@ IApplication* IApplication::New ()
|
|||||||
{
|
{
|
||||||
return new Application;
|
return new Application;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,6 @@ public:
|
|||||||
virtual void sweep () = 0;
|
virtual void sweep () = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern IApplication* theApp;
|
extern ScopedPointer <IApplication> theApp;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user