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>
bb10
Gabriel de Dietrich 2013-08-19 12:53:41 +02:00 committed by The Qt Project
parent 10e23c84d5
commit 68563cdabd
1 changed files with 1 additions and 0 deletions

View File

@ -594,6 +594,7 @@ void QCocoaEventDispatcherPrivate::temporarilyStopAllModalSessions()
if (info.session) {
[NSApp endModalSession:info.session];
info.session = 0;
[(NSWindow*) info.nswindow release];
}
}
currentModalSessionCached = 0;