<table><tr><td style="">jtamate updated this revision to Diff 38166.<br />jtamate edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-mmflslhixq2bdzl/">(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/D14253">View Revision</a></tr></table><br /><div><div><p>Using --num-callers=50, the leak shows as:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">==3437== 54,952 (32 direct, 54,920 indirect) bytes in 1 blocks are definitely lost in loss record 2,284 of 2,284
==3437== at 0x4C2EB4F: operator new(unsigned long) (vg_replace_malloc.c:334)
==3437== by 0xD7E54A9: QObjectPrivate::addConnection(int, QObjectPrivate::Connection*) (qobject.cpp:390)
==3437== by 0xD7E64AC: QMetaObjectPrivate::connect(QObject const*, int, QMetaObject const*, QObject const*, int, QMetaObject const*, int, int*) (qobject.cpp:3319)
==3437== by 0xD7E8D95: QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType) (qobject.cpp:2777)
==3437== by 0x7B34899: QObject::connect(QObject const*, char const*, char const*, Qt::ConnectionType) const (qobject.h:465)
==3437== by 0x7B94057: KIO::SlaveInterface::SlaveInterface(KIO::SlaveInterfacePrivate&, QObject*) (slaveinterface.cpp:48)
==3437== by 0x7B985BC: KIO::Slave::Slave(QString const&, QObject*) (slave.cpp:216)
==3437== by 0x7B99401: KIO::Slave::createSlave(QString const&, QUrl const&, int&, QString&) (slave.cpp:474)
==3437== by 0x7BC321A: KIO::ProtoQueue::createSlave(QString const&, KIO::SimpleJob*, QUrl const&) (scheduler.cpp:542)
==3437== by 0x7BC37CA: KIO::ProtoQueue::startAJob() (scheduler.cpp:629)
==3437== by 0x7BC6FF5: KIO::ProtoQueue::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_scheduler_p.cpp:252)</pre></div>
<p>The slaves registered are killed and deleted, therefore register the created slave.<br />
This leak is gone.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>Changed to new connect syntax.<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
Register the created slave in the m_connectedSlaveQueue.</span><br />
<br />
BUG: 396651</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/D14253?vs=38163&id=38166">https://phabricator.kde.org/D14253?vs=38163&id=38166</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14253">https://phabricator.kde.org/D14253</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/scheduler.cpp<br />
src/core/slave.cpp<br />
src/core/slaveinterface_p.h</div></div></div><br /><div><strong>To: </strong>jtamate, dfaure, Frameworks, ngraham<br /><strong>Cc: </strong>anthonyfieroni, apol, kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>