Merge lp://staging/~mterry/indicator-appmenu/double-ref-of-entry-label into lp://staging/indicator-appmenu/0.3

Proposed by Michael Terry
Status: Merged
Merged at revision: 132
Proposed branch: lp://staging/~mterry/indicator-appmenu/double-ref-of-entry-label
Merge into: lp://staging/indicator-appmenu/0.3
Diff against target: 12 lines (+1/-1)
1 file modified
src/window-menus.c (+1/-1)
To merge this branch: bzr merge lp://staging/~mterry/indicator-appmenu/double-ref-of-entry-label
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+78300@code.staging.launchpad.net

Description of the change

indicator-appmenu is creating a label for an IndicatorObjectEntry object then immediately ref'ing it. I believe this is because it wants to own the label and have it persist across container adds/removes.

Which works if it is added to a container. (the container will then claim the floating ref and remove it when done). But if not added to a container (and I can't see where that happens, so I'm guessing it doesn't?...), the floating ref will never be claimed and memory will be leaked.

It's better to just sink the ref ourselves. That way, we own the floating ref and free it, and other containers or users of the label can use normal ref semantics.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches