From 457829da52183d406164f8e8f13c4a35b3caf8d8 Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Thu, 13 Dec 2012 11:37:19 +0100 Subject: [PATCH] Fix memory leak in cocoa accessibility. Autorelease ("delete later") the created attribute name array. Change-Id: I2d7af9eb1fd899f04c8acb90204600a2dd43fa20 Reviewed-by: Frederik Gladhorn --- src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index 7d46ad5cde..c722ffb3bf 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -122,7 +122,7 @@ static QAccessibleInterface *acast(void *ptr) [attributes addObject : NSAccessibilityValueAttribute]; } - return attributes; + return [attributes autorelease]; } - (id)accessibilityAttributeValue:(NSString *)attribute {