Review Request 125971: k7zip: fix memleaks, lower memory usage
Nick Shaforostoff
shafff at ukr.net
Fri Nov 6 17:32:16 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125971/
-----------------------------------------------------------
(Updated Nov. 6, 2015, 5:32 p.m.)
Review request for KDE Frameworks and Laurent Montel.
Changes
-------
I have removed qDeleteAll(m_entryList) as it was causing one test to fail.
I have added a ~K7ZipFileEntry() destructor to delete m_buffer -> this removes about 1mb leaked memory during 'make test' execution, as shown by valgrind
Repository: karchive
Description
-------
i couldn't find the place where the pointers contained in the member arrays are deleted so i have added their releasing. for this i have used qDeleteAll (you can search for qDeleteAll in the diff)
also i have reordered members of FileInfo to reduce its 'sizeof'
also using qvector for storing pointers is as fast as using qlist (or even faster) and needs less memory
also i have switched qvector acces from operator[] to .at() because it is const (doesn't call detach() method internally)
also i have disabled the code that was filling 'method' string because it was not used anywhere after
Diffs (updated)
-----
src/k7zip.cpp 321620a
src/karchive.cpp 0ece37c
Diff: https://git.reviewboard.kde.org/r/125971/diff/
Testing
-------
compiles fine
Thanks,
Nick Shaforostoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151106/3f9e732a/attachment.html>
More information about the Kde-frameworks-devel
mailing list