Review Request 125971: k7zip: fix memleaks, lower memory usage

Milian Wolff mail at milianw.de
Fri Nov 6 12:25:05 UTC 2015


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

Ship it!


I'd remove the code, instead of just commenting it out if it's really not needed.

Also, minor nitpick: QList<T*> is pretty much equivalent to QVector<T*>, you won't see any big difference, performance or memory wise. That said, I'm all for using QVector everywhere by default. It's certainly not worse than QList ;-)

Thanks!

Oh and maybe wait for a review of David before pushing this. I have no clue about the code itself. The patch looks fine from my POV though.


src/k7zip.cpp (line 2644)
<https://git.reviewboard.kde.org/r/125971/#comment60438>

    this looks odd, either remove it or not, but don't just comment out the code


- Milian Wolff


On Nov. 5, 2015, 11:55 p.m., Nick Shaforostoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125971/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2015, 11:55 p.m.)
> 
> 
> Review request for KDE Frameworks and Laurent Montel.
> 
> 
> 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
> -----
> 
>   src/k7zip.cpp 321620a 
> 
> 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/6a829b5e/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list