feat:fix iOS memory leak in debugging

This commit is contained in:
pengfei.zhou
2021-03-04 10:02:29 +08:00
committed by osborn
parent b972cce1cd
commit 627f323ae3
14 changed files with 124 additions and 36 deletions

View File

@@ -48,6 +48,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)ensureRunOnJSThread:(dispatch_block_t)block;
- (void)initJSEngine;
- (void)teardown;
@end
NS_ASSUME_NONNULL_END

View File

@@ -101,9 +101,9 @@ - (instancetype)init {
return self;
}
- (void)dealloc {
- (void)teardown {
_destroyed = YES;
};
}
- (void)ensureRunOnJSThread:(dispatch_block_t)block {
if (NSThread.currentThread == _jsThread) {