D16553: Cache and delete old ConversationsDbusInterfaces to avoid memory leak
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Fri Nov 2 23:25:39 GMT 2018
apol requested changes to this revision.
apol added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> smsplugin.cpp:49
> + // deleted
> + const auto& oldInterfaceItr = SmsPlugin::conversationInterfaces.find(device()->id());
> + if (!(oldInterfaceItr == SmsPlugin::conversationInterfaces.end())) {
Use take, so we don't have to look it up twice?
> smsplugin.cpp:50
> + const auto& oldInterfaceItr = SmsPlugin::conversationInterfaces.find(device()->id());
> + if (!(oldInterfaceItr == SmsPlugin::conversationInterfaces.end())) {
> + ConversationsDbusInterface* oldInterface = oldInterfaceItr.value();
use !=
> smsplugin.h:134
> + */
> + static QMap<QString, ConversationsDbusInterface*> conversationInterfaces;
> +
Why static?
REPOSITORY
R224 KDE Connect
REVISION DETAIL
https://phabricator.kde.org/D16553
To: sredman, #kde_connect, apol
Cc: apol, kdeconnect, shivanshukantprasad, skymoore, wistak, dvalencia, rmenezes, julioc, Leptopoda, timothyc, jdvr, yannux, Danial0_0, johnq, Pitel, adeen-s, SemperPeritus, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, menasshock, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20181102/fbc07e53/attachment-0001.html>
More information about the KDEConnect
mailing list