فهرست منبع

Assign Abstract client as a parent of its AsyncReply(ies)

- If client died before async is finished or failed, memory leak occured
Viktor Kopp 5 سال پیش
والد
کامیت
624aca8d62
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/grpc/abstractclient.cpp

+ 1 - 1
src/grpc/abstractclient.cpp

@@ -71,7 +71,7 @@ bool AbstractClient::call(const QString &method, const QByteArray &arg, QByteArr
 
 AsyncReply *AbstractClient::call(const QString &method, const QByteArray &arg)
 {
-    AsyncReply *reply = new AsyncReply(d->channel);
+    AsyncReply *reply = new AsyncReply(d->channel, this);
 
     if (!d->channel) {
         d->lastError = AbstractChannel::Unknown;