summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-12-22 11:47:50 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-12-22 12:22:54 (GMT)
commitb2e5e2158529f49390ec597cda823c72336b23ff (patch)
tree285ad2493d949fbf843671d2e23f8e3e5c11efe1 /src
parent3f0a7ff17d6dba19ab3d73e3336990bedbfe14e7 (diff)
downloadQt-b2e5e2158529f49390ec597cda823c72336b23ff.zip
Qt-b2e5e2158529f49390ec597cda823c72336b23ff.tar.gz
Qt-b2e5e2158529f49390ec597cda823c72336b23ff.tar.bz2
Memory leak when using QWidget::setWindowIcon() in Carbon.
The icon was not released when destroying the window. Task-number: QTBUG-6973 Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwidget_mac.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 7dc4d85..0213af9 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4493,10 +4493,14 @@ void QWidgetPrivate::createTLSysExtra()
void QWidgetPrivate::deleteTLSysExtra()
{
#ifndef QT_MAC_USE_COCOA
- if(extra->topextra->group) {
+ if (extra->topextra->group) {
qt_mac_release_window_group(extra->topextra->group);
extra->topextra->group = 0;
}
+ if (extra->topextra->windowIcon) {
+ ReleaseIconRef(extra->topextra->windowIcon);
+ extra->topextra->windowIcon = 0;
+ }
#endif
}