Merge lp://qastaging/~thomir-deactivatedaccount/unity/fix-panel-memory-leaks into lp://qastaging/unity
Proposed by
Thomi Richards
Status: | Merged |
---|---|
Approved by: | Thomi Richards |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2257 |
Proposed branch: | lp://qastaging/~thomir-deactivatedaccount/unity/fix-panel-memory-leaks |
Merge into: | lp://qastaging/unity |
Diff against target: |
27 lines (+3/-3) 2 files modified
plugins/unityshell/src/PanelIndicatorEntryView.cpp (+2/-2) plugins/unityshell/src/PanelIndicatorEntryView.h (+1/-1) |
To merge this branch: | bzr merge lp://qastaging/~thomir-deactivatedaccount/unity/fix-panel-memory-leaks |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Approve | ||
Tim Penhey (community) | Approve | ||
Review via email:
|
Commit message
Fix memory leak in PanelIndicatorE
Description of the change
Problem: PanelIndicatorE
Solution: Delete the texture entry before re-creating it.
Tests: No tests, but valgrind no longer finds the memory leak.
UNBLOCK
To post a comment you must log in.
You shouldn't manually delete BaseTexture* objects as they are nux::Objects.
Instead define the member variable as:
nux::ObjectPtr< BaseTexture> entry_texture_;
Destructor line then isn't needed, nor the constructor.
The assignment needs to change to: ptr_from_ cairo_graphics( cg);
entry_texture_ = texture_
In fact, it looks like all that has to change is the header definition and the assignment.