summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorNorwegian Rock Cat <nrc@norwegianrockcat.com>2009-10-29 13:20:46 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-10-29 13:20:46 (GMT)
commit263c81d923a1ed90335a3fb05c87330630456073 (patch)
tree33bc7543285935f42661fa7309f5cbd1a5b66c47 /src/gui/kernel/qwidget_mac.mm
parent689184792390d539b7024ce800c6442c6a3dc213 (diff)
downloadQt-263c81d923a1ed90335a3fb05c87330630456073.zip
Qt-263c81d923a1ed90335a3fb05c87330630456073.tar.gz
Qt-263c81d923a1ed90335a3fb05c87330630456073.tar.bz2
Plug some autorelease pool leaks.
Calling QWidget::setCursor() outside of the event loop causes a memory leak in Cocoa. Adding an autorelease pool plugs it. Merge-request: 1791 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index ef71194..db11815 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2872,6 +2872,7 @@ void QWidgetPrivate::setCursor_sys(const QCursor &)
#else
Q_Q(QWidget);
if (q->testAttribute(Qt::WA_WState_Created)) {
+ QMacCocoaAutoReleasePool pool;
[qt_mac_window_for(q) invalidateCursorRectsForView:qt_mac_nativeview_for(q)];
}
#endif
@@ -2884,6 +2885,7 @@ void QWidgetPrivate::unsetCursor_sys()
#else
Q_Q(QWidget);
if (q->testAttribute(Qt::WA_WState_Created)) {
+ QMacCocoaAutoReleasePool pool;
[qt_mac_window_for(q) invalidateCursorRectsForView:qt_mac_nativeview_for(q)];
}
#endif