Skip to content

Commit 0979b75

Browse files
authored
Revert "Fixes oc leaks in platform plugin (flutter#15041)"
This reverts commit f173f3c.
1 parent c9f0a42 commit 0979b75

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,14 @@ - (void)vibrateHapticFeedback:(NSString*)feedbackType {
108108

109109
if (@available(iOS 10, *)) {
110110
if ([@"HapticFeedbackType.lightImpact" isEqualToString:feedbackType]) {
111-
[[[[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleLight] autorelease]
112-
impactOccurred];
111+
[[[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleLight] impactOccurred];
113112
} else if ([@"HapticFeedbackType.mediumImpact" isEqualToString:feedbackType]) {
114-
[[[[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium] autorelease]
113+
[[[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium]
115114
impactOccurred];
116115
} else if ([@"HapticFeedbackType.heavyImpact" isEqualToString:feedbackType]) {
117-
[[[[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleHeavy] autorelease]
118-
impactOccurred];
116+
[[[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleHeavy] impactOccurred];
119117
} else if ([@"HapticFeedbackType.selectionClick" isEqualToString:feedbackType]) {
120-
[[[[UISelectionFeedbackGenerator alloc] init] autorelease] selectionChanged];
118+
[[[UISelectionFeedbackGenerator alloc] init] selectionChanged];
121119
}
122120
}
123121
}

0 commit comments

Comments
 (0)