mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
Wallet: fix listener leak
This commit is contained in:
parent
76a105261e
commit
6ef2a8e21d
2 changed files with 5 additions and 1 deletions
|
@ -863,7 +863,8 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
||||||
m_history = new TransactionHistory(m_walletImpl->history(), this);
|
m_history = new TransactionHistory(m_walletImpl->history(), this);
|
||||||
m_addressBook = new AddressBook(m_walletImpl->addressBook(), this);
|
m_addressBook = new AddressBook(m_walletImpl->addressBook(), this);
|
||||||
m_subaddress = new Subaddress(m_walletImpl->subaddress(), this);
|
m_subaddress = new Subaddress(m_walletImpl->subaddress(), this);
|
||||||
m_walletImpl->setListener(new WalletListenerImpl(this));
|
m_walletListener = new WalletListenerImpl(this);
|
||||||
|
m_walletImpl->setListener(m_walletListener);
|
||||||
m_connectionStatus = Wallet::ConnectionStatus_Disconnected;
|
m_connectionStatus = Wallet::ConnectionStatus_Disconnected;
|
||||||
// start cache timers
|
// start cache timers
|
||||||
m_connectionStatusTime.restart();
|
m_connectionStatusTime.restart();
|
||||||
|
@ -896,5 +897,7 @@ Wallet::~Wallet()
|
||||||
qDebug("Error storing wallet cache");
|
qDebug("Error storing wallet cache");
|
||||||
delete m_walletImpl;
|
delete m_walletImpl;
|
||||||
m_walletImpl = NULL;
|
m_walletImpl = NULL;
|
||||||
|
delete m_walletListener;
|
||||||
|
m_walletListener = NULL;
|
||||||
qDebug("m_walletImpl deleted");
|
qDebug("m_walletImpl deleted");
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,6 +349,7 @@ private:
|
||||||
bool m_connectionStatusRunning;
|
bool m_connectionStatusRunning;
|
||||||
QString m_daemonUsername;
|
QString m_daemonUsername;
|
||||||
QString m_daemonPassword;
|
QString m_daemonPassword;
|
||||||
|
Monero::WalletListener *m_walletListener;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue