<table><tr><td style="">dfaure created this revision.<br />dfaure added reviewers: aacid, mpyne.<br />dfaure added a subscriber: Frameworks.<br />Restricted Application added a project: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4439" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The Entry class owns the Client instances, so it should delete the<br />
remaining instances in its destructor, for the case where they haven't<br />
been removed one by one. The line of code removeEntries(nullptr) was<br />
probably means to remove them one by one, but it was a no-op (the code<br />
for that method doesn't expect nullptr as argument) and it would be<br />
slow anyway. We don't need to call inotify_remove for every path,<br />
when we're just cleaning up in a global static after qApp destruction.</p>
<p>Detected by a clang-sanitizer build on <a href="http://ci-logs.kde.flaska.net" class="remarkup-link" target="_blank" rel="noreferrer">http://ci-logs.kde.flaska.net</a><br />
and reproduced locally with valgrind.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>./kdirwatch_*_unittest now passes in valgrind without memory<br />
leaks being reported</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4439" rel="noreferrer">https://phabricator.kde.org/D4439</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/lib/io/kdirwatch.cpp<br />
src/lib/io/kdirwatch_p.h</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>dfaure, aacid, mpyne<br /><strong>Cc: </strong>Frameworks<br /></div>