diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-07 09:15:20 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-07 09:15:20 +0200 |
commit | 5cba3372881994b5afa96449237aab80cc424e6d (patch) | |
tree | 34284cca22e42410a0dd375a0cfdb02e3b94fa7c /common/listener.h | |
parent | ac61e46c81e248841829adfc63b1804b9df6feb1 (diff) | |
download | sink-5cba3372881994b5afa96449237aab80cc424e6d.tar.gz sink-5cba3372881994b5afa96449237aab80cc424e6d.zip |
Less memory leaking with unique_ptr
Diffstat (limited to 'common/listener.h')
-rw-r--r-- | common/listener.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/listener.h b/common/listener.h index 5e376c7..67d76e9 100644 --- a/common/listener.h +++ b/common/listener.h | |||
@@ -81,17 +81,17 @@ private: | |||
81 | bool processClientBuffer(Client &client); | 81 | bool processClientBuffer(Client &client); |
82 | void sendCommandCompleted(QLocalSocket *socket, uint messageId, bool success); | 82 | void sendCommandCompleted(QLocalSocket *socket, uint messageId, bool success); |
83 | void updateClientsWithRevision(qint64); | 83 | void updateClientsWithRevision(qint64); |
84 | Sink::Resource *loadResource(); | 84 | Sink::Resource &loadResource(); |
85 | void readFromSocket(QLocalSocket *socket); | 85 | void readFromSocket(QLocalSocket *socket); |
86 | qint64 lowerBoundRevision(); | 86 | qint64 lowerBoundRevision(); |
87 | 87 | ||
88 | QLocalServer *m_server; | 88 | std::unique_ptr<QLocalServer> m_server; |
89 | QVector<Client> m_connections; | 89 | QVector<Client> m_connections; |
90 | flatbuffers::FlatBufferBuilder m_fbb; | 90 | flatbuffers::FlatBufferBuilder m_fbb; |
91 | const QByteArray m_resourceName; | 91 | const QByteArray m_resourceName; |
92 | const QByteArray m_resourceInstanceIdentifier; | 92 | const QByteArray m_resourceInstanceIdentifier; |
93 | Sink::Resource *m_resource; | 93 | std::unique_ptr<Sink::Resource> m_resource; |
94 | QTimer *m_clientBufferProcessesTimer; | 94 | std::unique_ptr<QTimer> m_clientBufferProcessesTimer; |
95 | QTimer *m_checkConnectionsTimer; | 95 | std::unique_ptr<QTimer> m_checkConnectionsTimer; |
96 | int m_messageId; | 96 | int m_messageId; |
97 | }; | 97 | }; |