summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-08-19 12:53:41 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-22 19:14:03 +0200
commit68563cdabd3b9ff1f9ebba98f700ea70e085ded8 (patch)
tree81455c3bc93c4d78aba377625dfc272f141064d3 /src/plugins/platforms/cocoa
parent10e23c84d5cbd40ca054a2040e0fac38c248b34d (diff)
Cocoa: Fix memory leak in event dispatcher
We retain each modal NSWindow as long as its modal session is running, and we should release it every time that modal session ends. Task-number: QTBUG-32728 Change-Id: Ia30c9c2d15be1350e7150a0d3c2f530a2fe4f38b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
index 2ac9a5dac9..9a661ffe5a 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
@@ -594,6 +594,7 @@ void QCocoaEventDispatcherPrivate::temporarilyStopAllModalSessions()
if (info.session) {
[NSApp endModalSession:info.session];
info.session = 0;
+ [(NSWindow*) info.nswindow release];
}
}
currentModalSessionCached = 0;