graesslin added a comment.
In https://phabricator.kde.org/D6630#124201, @davidedmundson wrote: > Whilst this does make sense based on the current design we are effectively building up dead objects during the lifespan of a window doing show/hide/show. Well it was designed when Qt didn't behave like that :-( > Someone somewhere should delete it. Assuming everyone follows the same design pattern of following QWindow::hideEvent everyone calling deleteLater() would be safe, but it relies on all parties dealing with surfaces to do that. No it wouldn't, because KWin doesn't behave like Qt. KWin does not delete a surface when a window gets hidden, but reuses it. Basically KWin behaves exactly as Qt used to, the pattern was taken from QtWayland. Now this diverged. A possibility could be QSharedPointer, so that every user can discard it's own instance, but that requires also changes all over the place. REPOSITORY R31 Breeze BRANCH master REVISION DETAIL https://phabricator.kde.org/D6630 To: graesslin, #plasma, mart, davidedmundson Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas