mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 10:35:50 +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()
|
||||
{
|
||||
assert(mTxnDB==NULL);
|
||||
|
||||
mTxnDB=new DatabaseCon("transaction.db");
|
||||
mTxnDB->getDB()->executeSQL(TxnDBInit.c_str());
|
||||
|
||||
@@ -100,3 +102,12 @@ void Application::run()
|
||||
//BOOST_LOG_TRIVIAL(info) << "Done.";
|
||||
std::cout << "Done." << std::endl;
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
delete mTxnDB;;
|
||||
delete mLedgerDB;
|
||||
delete mWalletDB;
|
||||
delete mHashNodeDB;
|
||||
delete mNetNodeDB;
|
||||
}
|
||||
@@ -56,6 +56,7 @@ class Application
|
||||
|
||||
public:
|
||||
Application();
|
||||
~Application();
|
||||
|
||||
ConnectionPool& getConnectionPool() { return mConnectionPool; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user