From f5641c503b241f3984f645d2859733a6390debf5 Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Mon, 21 May 2012 08:22:01 +0200 Subject: Cocoa: Fix memory leak in the accessibility code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QCocoaAccessibleElement takes ownership of the QAccessibleinterface pointer. Delete it in dealloc(). Change-Id: I45a5540b9cf564c639bfa119ff4882008d63fd96 Reviewed-by: Jan-Arve Sæther --- src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index 58284bcddb..0384787bb6 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -73,6 +73,7 @@ static QAccessibleInterface *acast(void *ptr) - (void)dealloc { [super dealloc]; + delete acast(accessibleInterface); } - (BOOL)isEqual:(id)object { -- cgit v1.2.3