Fix memory leak in FlutterSwitchSemanticsObject (flutter/engine#28065)

This commit is contained in:
ColdPaleLight 2021-08-27 04:21:01 +08:00 committed by GitHub
parent 341a0f2f24
commit bfce29ca8e

View File

@ -100,7 +100,7 @@ CGRect ConvertRectToGlobal(SemanticsObject* reference, CGRect local_rect) {
uid:(int32_t)uid {
self = [super initWithBridge:bridge uid:uid];
if (self) {
_nativeSwitch = [[[UISwitch alloc] init] retain];
_nativeSwitch = [[UISwitch alloc] init];
}
return self;
}