We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ace313c commit f8cb1c1Copy full SHA for f8cb1c1
package/contents/ui/DBusPrimary.qml
@@ -28,7 +28,13 @@ QtObject {
28
function call(callback) {
29
const reply = DBus.SessionBus.asyncCall(root.msg) as DBus.DBusPendingReply
30
if (callback) {
31
- reply.finished.connect(() => callback(reply))
+ reply.finished.connect(() => {
32
+ callback(reply)
33
+ // Make sure to destroy after the reply is finished otherwise it may get leaked because the connected signal
34
+ // holds a reference and prevents garbage collection.
35
+ // https://discuss.kde.org/t/high-memory-usage-from-plasmashell-is-it-a-memory-leak/29105
36
+ reply.destroy()
37
+ })
38
}
39
40
0 commit comments