Review Request 127795: [DataEngine] Fix memory leak and possible crash + detailed test
Anthony Fieroni
bvbfan at abv.bg
Mon May 2 17:44:15 UTC 2016
> On Май 2, 2016, 8:04 след обяд, David Edmundson wrote:
> > src/plasma/dataengine.cpp, line 574
> > <https://git.reviewboard.kde.org/r/127795/diff/3/?file=462320#file462320line574>
> >
> > This is the memory leak fix?
> >
> > If so, it's wrong.
> >
> > we get called from:
> >
> > QObject::connect(source, SIGNAL(destroyed(QObject*)), this, SLOT(sourceDestroyed(QObject*)));
> >
> >
> > destroyed() signal is emitted in QObject::~QObject
> >
> > so it's already been deleted.
>
> Anthony Fieroni wrote:
> A witch line is that?
>
> David Edmundson wrote:
> dataengine.cpp:270
>
> and QObject::destroyed is described here: http://doc.qt.io/qt-5/qobject.html#destroyed
>
> Anthony Fieroni wrote:
> 521 is the same. But in two cases 'this' and 'q' are DataEngine not DataEnginePrivate where is actually the slot void DataEnginePrivate::sourceDestroyed(QObject *object).
> So even my fix is wrong :)
>
> David Edmundson wrote:
> >But in two cases 'this' and 'q' are DataEngine not DataEnginePrivate
>
> That's not a problem because the DataEngine header uses Q_PRIVATE_SLOT.
>
> So it's still the DataEngine qobject with the slot, it's just the implementation is in DataEnginePrivate
Oh, i missing that. So 575 emit q->sourceRemoved(object->objectName()); is definitly wrong, it's emitted twice. At last is there smothing notable for this review or to discard it?
- Anthony
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127795/#review95098
-----------------------------------------------------------
On Май 2, 2016, 5:20 след обяд, Anthony Fieroni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127795/
> -----------------------------------------------------------
>
> (Updated Май 2, 2016, 5:20 след обяд)
>
>
> Review request for KDE Frameworks and Marco Martin.
>
>
> Repository: plasma-framework
>
>
> Description
> -------
>
> ^^
>
>
> Diffs
> -----
>
> autotests/pluginloadertest.h 61fc963
> autotests/pluginloadertest.cpp 4f96780
> src/plasma/datacontainer.cpp ee067db
> src/plasma/dataengine.cpp f942926
> src/plasma/private/dataenginemanager.cpp 08e42fb
>
> Diff: https://git.reviewboard.kde.org/r/127795/diff/
>
>
> Testing
> -------
>
> Test pass.
>
>
> Thanks,
>
> Anthony Fieroni
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160502/7b620189/attachment.html>
More information about the Kde-frameworks-devel
mailing list