Review Request 117753: Fix memory leak with Dropbox version control plugin.

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Thu Apr 24 20:13:04 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117753/
-----------------------------------------------------------

Review request for Dolphin.


Repository: kde-baseapps


Description
-------

Fix memory leak with Dropbox version control plugin.

The Dropbox plugins creates a new QLocalSocket on each
beginRetrieval call and this socket should be deleted again
in endRetrieval. But if Dropbox is not running or doesn't respond
beginRetrieval will return false and so endRetrieval won't be called -> memory leak.

In the current version we only call endRetrieval when
beginRetrieval was successfully in UpdateItemStatesThread::run(). 
This causes some problems with version control plugins (like Dropbox plugin), 
which have to do cleanups in endRetrieval.

Now we always call endRetrieval after beginRetrieval when updating the version states.

The Dropbox plugin is the only official version control plugin which really uses endRetrieval,
the other plugins have an empty endRetrieval. Because of that I think it is safe enough
for 4.13.1.


Diffs
-----

  dolphin/src/views/versioncontrol/updateitemstatesthread.cpp 6457f60 

Diff: https://git.reviewboard.kde.org/r/117753/diff/


Testing
-------

No memory leak anymore, when beginRetrieval was not successful.

Dropbox, Git and svn plugin still work.


Thanks,

Emmanuel Pescosta

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20140424/48785038/attachment.htm>


More information about the kfm-devel mailing list