Skip to content
Snippets Groups Projects
Commit d28e2ca2 authored by Olivier Couet's avatar Olivier Couet
Browse files

Fix memory leak in the Cocoa backend.

This was reported here:
https://sft.its.cern.ch/jira/browse/ROOT-8951

Fix from Timur:

1. Add missing TGCocoa::ClosePixmap implementation. Apparently, while scanning for this function
    calls in TPad's code, I forgot to check TPadPainter and thus decided it's never used at all.
2. Make DestroyDrawable more 'atomic' - hide the fact that we first have to 'select drawable'
    (gVirtualX->SelectWindow(id) - note, SelectWindow for pixmap!!!) and then call
    ClosePixmap() - this is due to the old design problem/inconsistency in X11 backend
    and TPad::fPixmapID, which is not a real pixmap ID but some index that points to array
    where the real pixmap id is. Now DestroyDrawable accepts this fPixmapID and does
   all work of selecting pixmap and closing it.
parent d670325e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment