Code review comment for lp:~aacid/unity-2d/fix_memory_leaks_from_qtbamf_lists

Revision history for this message
Lohith D Shivamurthy (dyams) wrote :

Albert,
Very nice. Good catch. I can approve the branch already.

I wanted to get clarified for one thing more. Well, In a way, It mayn't be related to your current branch. But just in case if you are also as curious as me, go through the following paragraph.

I just observed one corner case not being handled properly in
  <code> WindowInfo::getBamfWindowForApplication </code> line #46, in windowinfo.cpp
Currently whats happening is, even when there is no match found for given 'xid' in the list of applicatio->windows(),
The function still returns a valid BamfWindow pointer, which is the last item in the list.
 <code> window = windows->at(i); </code> line #56, windowinfo.cpp
Should we add
  <code> window = NULL </code>
line below:
  <code>
    if (window->xid() == xid) { line # 57, 58 & 59, in windowinfo.cpp
      break;
    }
  </code>
?

Correct me if am wrong. please.

review: Needs Information

« Back to merge proposal