diff options
author | Morten Sorvig <msorvig@trolltech.com> | 2011-03-17 11:22:26 (GMT) |
---|---|---|
committer | Morten Sorvig <msorvig@trolltech.com> | 2011-03-17 11:23:05 (GMT) |
commit | 64f06b90f58a3f88482e116fa36f2b26acd82b0b (patch) | |
tree | 55fafea9c5ebd63854f2f821c3fa53b3d0cc6d18 | |
parent | 58548add6d3ff7c09db0573abdba4d006a10bad1 (diff) | |
download | Qt-64f06b90f58a3f88482e116fa36f2b26acd82b0b.zip Qt-64f06b90f58a3f88482e116fa36f2b26acd82b0b.tar.gz Qt-64f06b90f58a3f88482e116fa36f2b26acd82b0b.tar.bz2 |
Mac: add autorelease pools to create_sys
Fixes a couple of on-startup leaks.
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 14a90ef..34918e4 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2476,6 +2476,8 @@ void QWidgetPrivate::createWindow_sys() void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyOldWindow) { Q_Q(QWidget); + QMacCocoaAutoReleasePool pool; + OSViewRef destroyid = 0; #ifndef QT_MAC_USE_COCOA window_event = 0; @@ -4423,6 +4425,8 @@ void QWidgetPrivate::adjustWithinMaxAndMinSize(int &w, int &h) void QWidgetPrivate::applyMaxAndMinSizeOnWindow() { Q_Q(QWidget); + QMacCocoaAutoReleasePool pool; + const float max_f(20000); #ifndef QT_MAC_USE_COCOA #define SF(x) ((x > max_f) ? max_f : x) |