Fix memory leak of FlutterCustomAccessibilityAction (flutter/engine#17954)

This commit is contained in:
Wu Zhong 2020-05-07 05:08:58 +08:00 committed by GitHub
parent f1e911f717
commit 7dec4ba0a8

View File

@ -76,9 +76,9 @@ void AccessibilityBridge::UpdateSemantics(flutter::SemanticsNodeUpdates nodes,
NSString* label = @(action.label.data());
SEL selector = @selector(onCustomAccessibilityAction:);
FlutterCustomAccessibilityAction* customAction =
[[FlutterCustomAccessibilityAction alloc] initWithName:label
target:object
selector:selector];
[[[FlutterCustomAccessibilityAction alloc] initWithName:label
target:object
selector:selector] autorelease];
customAction.uid = action_id;
[accessibilityCustomActions addObject:customAction];
}