Cocoa: Clean up memory leak when providing the accessibilityActions

Change-Id: Ib69155ceedb7bf35e3a7b5daa309fc2d54e3f254
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
Andy Shaw 2017-05-11 07:56:35 +02:00
parent 7076438db4
commit 3dd089c08b

View File

@ -509,7 +509,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
// actions // actions
- (NSArray *)accessibilityActionNames { - (NSArray *)accessibilityActionNames {
NSMutableArray * nsActions = [NSMutableArray new]; NSMutableArray *nsActions = [[NSMutableArray new] autorelease];
QAccessibleInterface *iface = QAccessible::accessibleInterface(axid); QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
if (!iface || !iface->isValid()) if (!iface || !iface->isValid())
return nsActions; return nsActions;