diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-25 23:25:15 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-25 23:25:15 (GMT) |
commit | 4602d75963a415d3ebe20a807aed7284b714790e (patch) | |
tree | cdcc0143c3050fd58e5c785c8849168b009871be /src/gui/kernel | |
parent | ccebbb663a1b21204057d8b799de3ddf1b63307e (diff) | |
parent | 2ab77ea436c1ad1a35b0c8e2183aa78edbbe4765 (diff) | |
download | Qt-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.mm | 2 |
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 |