mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Close small memory leak.
This commit is contained in:
@@ -50,6 +50,8 @@ extern std::string TxnDBInit, LedgerDBInit, WalletDBInit, HashNodeDBInit, NetNod
|
|||||||
|
|
||||||
void Application::run()
|
void Application::run()
|
||||||
{
|
{
|
||||||
|
assert(mTxnDB==NULL);
|
||||||
|
|
||||||
mTxnDB=new DatabaseCon("transaction.db");
|
mTxnDB=new DatabaseCon("transaction.db");
|
||||||
mTxnDB->getDB()->executeSQL(TxnDBInit.c_str());
|
mTxnDB->getDB()->executeSQL(TxnDBInit.c_str());
|
||||||
|
|
||||||
@@ -100,3 +102,12 @@ void Application::run()
|
|||||||
//BOOST_LOG_TRIVIAL(info) << "Done.";
|
//BOOST_LOG_TRIVIAL(info) << "Done.";
|
||||||
std::cout << "Done." << std::endl;
|
std::cout << "Done." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Application::~Application()
|
||||||
|
{
|
||||||
|
delete mTxnDB;;
|
||||||
|
delete mLedgerDB;
|
||||||
|
delete mWalletDB;
|
||||||
|
delete mHashNodeDB;
|
||||||
|
delete mNetNodeDB;
|
||||||
|
}
|
||||||
@@ -56,6 +56,7 @@ class Application
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Application();
|
Application();
|
||||||
|
~Application();
|
||||||
|
|
||||||
ConnectionPool& getConnectionPool() { return mConnectionPool; }
|
ConnectionPool& getConnectionPool() { return mConnectionPool; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user