Review Request 127795: [DataEngine] Fix memory leak and possible crash + detailed test

David Edmundson david at davidedmundson.co.uk
Mon May 2 16:33:08 UTC 2016


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



Which bit leaks? Why does it leak?
and what specific thing fixes it.


src/plasma/datacontainer.cpp (line 170)
<https://git.reviewboard.kde.org/r/127795/#comment64530>

    this has absolutely nothing to do with fixing a leak and a possible crash.



src/plasma/datacontainer.cpp (line 262)
<https://git.reviewboard.kde.org/r/127795/#comment64531>

    why check storage is not null?
    
    if storageCount > 1 and storage is null we have a huge bug elsewhere.



src/plasma/dataengine.cpp (line 415)
<https://git.reviewboard.kde.org/r/127795/#comment64533>

    This (and the following changes) accomplish absolutely nothing!
    
    previously. It started on -1, went down on refs, went up on refs. 
    The only other usage is isUsed() which compares it to zero.
    
    You've just switched the logic from negative to positive.
    
    Whilst I agree yours makes far more sense, given you haven't mentioned it, it seem like you're just changing things at random without understanding it.



src/plasma/dataengine.cpp (line 419)
<https://git.reviewboard.kde.org/r/127795/#comment64534>

    Why?



src/plasma/dataengine.cpp (line 573)
<https://git.reviewboard.kde.org/r/127795/#comment64536>

    Deleting an object auotmatically disconnects it
    
    This seems like a terrible thing to do.


- David Edmundson


On May 2, 2016, 2:20 p.m., Anthony Fieroni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127795/
> -----------------------------------------------------------
> 
> (Updated May 2, 2016, 2:20 p.m.)
> 
> 
> 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/0b99efd8/attachment.html>


More information about the Kde-frameworks-devel mailing list