feat:remove Context instance before js destory
This commit is contained in:
@@ -70,11 +70,10 @@ - (DoricContext *)getContext:(NSString *)contextId {
|
||||
|
||||
- (void)destroyContext:(DoricContext *)context {
|
||||
NSString *contextId = context.contextId;
|
||||
[context.driver destroyContext:contextId].finishCallback = ^{
|
||||
dispatch_sync(self.mapQueue, ^() {
|
||||
[self.doricContextMap removeObjectForKey:contextId];
|
||||
});
|
||||
};
|
||||
dispatch_sync(self.mapQueue, ^() {
|
||||
[self.doricContextMap removeObjectForKey:contextId];
|
||||
});
|
||||
[context.driver destroyContext:contextId];
|
||||
}
|
||||
|
||||
- (NSArray *)aliveContexts {
|
||||
|
Reference in New Issue
Block a user