Feature/zpf (#564)

* iOS: fix memory leak of blur effect

* js: fix callback cause memory leak
This commit is contained in:
osborn
2022-12-20 15:06:46 +08:00
committed by GitHub
parent c60754c53d
commit be4fb05f91
13 changed files with 77 additions and 22 deletions

View File

@@ -11,8 +11,11 @@ @interface DoricDemoPlugin : DoricNativePlugin
@implementation DoricDemoPlugin
- (void)test {
}
- (void)test2:(NSString *)val withPromise:(DoricPromise *)promise {
dispatch_async(dispatch_get_main_queue(), ^{
ShowToast(@"Test called", DoricGravityCenter);
[promise resolve:nil];
});
}
@end

View File

@@ -46,10 +46,7 @@ - (void)viewDidLoad {
[Doric registerLibrary:[DemoLibrary new]];
[Doric enablePerformance:YES];
[Doric enableRenderSnapshot:YES];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.view addSubview:[[UITableView new] also:^(UITableView *it) {
it.width = self.view.width;
it.height = self.view.height;
@@ -59,6 +56,10 @@ - (void)viewDidAppear:(BOOL)animated {
}]];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.demoFilePaths.count;
}