cullmann added a comment.
I don't speak about threading races. The whole class is not thread-safe, if threading occurs, all is lost. But I see the chance, that you arrive twice at the m_reusablePhonons.insert(m); line, as there are multiple ways into the function doing that, one e.g. via NotifyByAudio::close and one in NotifyByAudio::onAudioFinished. If you e.g. have a queued event for NotifyByAudio::onAudioFinished, that might happen even after you do ::close. In any case, with the hash set we don't need to care for that. REPOSITORY R289 KNotifications REVISION DETAIL https://phabricator.kde.org/D6376 To: cullmann, #frameworks Cc: mpyne, rjvbb