diff options
author | Norwegian Rock Cat <nrc@norwegianrockcat.com> | 2009-10-29 13:20:46 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2009-10-29 13:20:46 (GMT) |
commit | 263c81d923a1ed90335a3fb05c87330630456073 (patch) | |
tree | 33bc7543285935f42661fa7309f5cbd1a5b66c47 | |
parent | 689184792390d539b7024ce800c6442c6a3dc213 (diff) | |
download | Qt-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>
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 2 |
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 |