<table><tr><td style="">jtamate updated this revision to Diff 32640.<br />jtamate edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-e3hzbe7wxs3tmzm/">(Show Details)</a><br />jtamate edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-a3gj6e4yalqahp6/">(Show Details)</a><br />jtamate added a comment.
</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/D12371">View Revision</a></tr></table><br /><div><div><p>Implemented as Aleix suggested, using QPointer.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Don't take ownership of KDirLister in KDirModel</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">When KDirModel is destroyed, it also deletes the dirlister, but KCoreDirListerCache didn't knew anything about this deletion, and when it consulted listersCurrentlyHolding in slotRedirection resulted always in a crash</span>.<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">When KDirModel is destroyed, it also deleted the dirlister, but KCoreDirListerCache didn't knew anyth</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Us</span>ing <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">about this deletion</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">QPointer</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">and when it consulted </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">it can detect when dir</span>liste<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">rsCurrentlyHolding in slotRedirection resulted always in a crash</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">r has been deleted and remove it from the list</span>.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>Now, again the error message (Next thing to investigate).<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"><br />
<br />
In my [limited] tests this doens't introduce memory leaks.</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D12371?vs=32626&id=32640">https://phabricator.kde.org/D12371?vs=32626&id=32640</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12371">https://phabricator.kde.org/D12371</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/kcoredirlister.cpp<br />
src/core/kcoredirlister_p.h</div></div></div><br /><div><strong>To: </strong>jtamate, dfaure, Frameworks<br /><strong>Cc: </strong>apol, michaelh, bruns<br /></div>