summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-11-25 23:25:15 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-11-25 23:25:15 (GMT)
commit4602d75963a415d3ebe20a807aed7284b714790e (patch)
treecdcc0143c3050fd58e5c785c8849168b009871be /src/gui/kernel
parentccebbb663a1b21204057d8b799de3ddf1b63307e (diff)
parent2ab77ea436c1ad1a35b0c8e2183aa78edbbe4765 (diff)
downloadQt-4602d75963a415d3ebe20a807aed7284b714790e.zip
Qt-4602d75963a415d3ebe20a807aed7284b714790e.tar.gz
Qt-4602d75963a415d3ebe20a807aed7284b714790e.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix some memory leaks.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index d5363bd..e02cf11 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -554,6 +554,7 @@ static int qCocoaViewCount = 0;
}
CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+ CGContextRetain(cg);
qwidgetprivate->hd = cg;
// We steal the CGContext for flushing in the unified toolbar with the raster engine.
@@ -653,6 +654,7 @@ static int qCocoaViewCount = 0;
}
qwidgetprivate->hd = 0;
CGContextRestoreGState(cg);
+ CGContextRelease(cg);
}
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent