diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2010-11-25 17:21:12 +0100 |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2010-11-25 17:24:40 +0100 |
commit | 2ab77ea436c1ad1a35b0c8e2183aa78edbbe4765 (patch) | |
tree | 7928a5256adf12e8b65ed5e89f846fa7afe3e9ca /src/gui/painting/qunifiedtoolbarsurface_mac.cpp | |
parent | 6f5ed5836bd96b69d47aa3260118b3b49dddc82f (diff) |
Fix some memory leaks.
Update the retain/release mechanism for
CGContexts. Some leaks were due to unnecessary
retain calls.
Task-number: QTBUG-15373
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting/qunifiedtoolbarsurface_mac.cpp')
-rw-r--r-- | src/gui/painting/qunifiedtoolbarsurface_mac.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qunifiedtoolbarsurface_mac.cpp b/src/gui/painting/qunifiedtoolbarsurface_mac.cpp index b25757b739..ace0a46693 100644 --- a/src/gui/painting/qunifiedtoolbarsurface_mac.cpp +++ b/src/gui/painting/qunifiedtoolbarsurface_mac.cpp @@ -188,6 +188,8 @@ void QUnifiedToolbarSurface::flush(QWidget *widget, const QRegion &rgn, const QP // Restore context. CGContextRestoreGState(context); + CGContextRelease(context); + widget->d_func()->cgContext = 0; widget->d_func()->hasOwnContext = false; } |