Cocoa: Fix memory leak in the accessibility code.
authorMorten Johan Sorvig <morten.sorvig@nokia.com>
Mon, 21 May 2012 06:22:01 +0000 (08:22 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 21 May 2012 11:00:29 +0000 (13:00 +0200)
QCocoaAccessibleElement takes ownership of the
QAccessibleinterface pointer. Delete it in dealloc().

Change-Id: I45a5540b9cf564c639bfa119ff4882008d63fd96
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm

index 58284bc..0384787 100644 (file)
@@ -73,6 +73,7 @@ static QAccessibleInterface *acast(void *ptr)
 
 - (void)dealloc {
     [super dealloc];
+    delete acast(accessibleInterface);
 }
 
 - (BOOL)isEqual:(id)object {