aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-11-18 15:47:20 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-11-23 12:33:35 +0100
commit47db07537746940ee7dd0739a8c73e328837813f (patch)
tree41078e611f150defe1fd793b1709d0019271e69b /src/qt/peertablemodel.h
parent9346f8429957e356d21c665bab59fe45bcf1f74e (diff)
downloadbitcoin-47db07537746940ee7dd0739a8c73e328837813f.tar.xz
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.
Diffstat (limited to 'src/qt/peertablemodel.h')
-rw-r--r--src/qt/peertablemodel.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index a4f7bbdb3d..af34b147b1 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -46,6 +46,7 @@ class PeerTableModel : public QAbstractTableModel
public:
explicit PeerTableModel(ClientModel *parent = 0);
+ ~PeerTableModel();
const CNodeCombinedStats *getNodeStats(int idx);
int getRowByNodeId(NodeId nodeid);
void startAutoRefresh();
@@ -75,7 +76,7 @@ public Q_SLOTS:
private:
ClientModel *clientModel;
QStringList columns;
- PeerTablePriv *priv;
+ std::unique_ptr<PeerTablePriv> priv;
QTimer *timer;
};