Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86b02274 authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Fix memory leak

Remove the callback when cancelling the job.

Test: heapdump after changing themes
Fixes: 303457414
Change-Id: I62fbf3248ee6b6400e2dddc3711e2ac91fe4ba6d
parent 97ee1bfd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ constructor(

    override fun removeCallback(callback: QSHost.Callback) {
        if (useNewHost) {
            synchronized(callbacksMap) { callbacksMap.get(callback)?.cancel() }
            synchronized(callbacksMap) { callbacksMap.remove(callback)?.cancel() }
        } else {
            qsTileHost.removeCallback(callback)
        }