mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 12:55:02 +02:00
qt: Plug many memory leaks
None of these are very serious, and are leaks in objects that are created at most one time. In most cases this means properly using the QObject parent hierarchy, except for BanTablePriv/PeerTablePriv which are not QObject, so use a std::unique_ptr instead.
This commit is contained in:
@@ -87,7 +87,7 @@ BanTableModel::BanTableModel(ClientModel *parent) :
|
||||
clientModel(parent)
|
||||
{
|
||||
columns << tr("IP/Netmask") << tr("Banned Until");
|
||||
priv = new BanTablePriv();
|
||||
priv.reset(new BanTablePriv());
|
||||
// default to unsorted
|
||||
priv->sortColumn = -1;
|
||||
|
||||
@@ -95,6 +95,11 @@ BanTableModel::BanTableModel(ClientModel *parent) :
|
||||
refresh();
|
||||
}
|
||||
|
||||
BanTableModel::~BanTableModel()
|
||||
{
|
||||
// Intentionally left empty
|
||||
}
|
||||
|
||||
int BanTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
Reference in New Issue
Block a user