aboutsummaryrefslogtreecommitdiff
path: root/user.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-26 11:09:34 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-26 11:09:34 +0900
commit979756e26af57e715efe64f8de8068243fa27e9f (patch)
treeb343cfba18f1a69ccd934b7d060cdf2187ba70f3 /user.cpp
parent4bb5f23d1b70136769a8df76907acb75aa824af9 (diff)
downloadlibquotient-979756e26af57e715efe64f8de8068243fa27e9f.tar.gz
libquotient-979756e26af57e715efe64f8de8068243fa27e9f.zip
Deal with memory more carefully
Plugs some memory leaks reported by Valgrind.
Diffstat (limited to 'user.cpp')
-rw-r--r--user.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/user.cpp b/user.cpp
index 9cdbb420..308b217c 100644
--- a/user.cpp
+++ b/user.cpp
@@ -48,6 +48,11 @@ class User::Private
Private(QString userId, Connection* connection)
: userId(move(userId)), connection(connection)
{ }
+ ~Private()
+ {
+ for (auto a: otherAvatars)
+ delete a;
+ }
QString userId;
Connection* connection;