[ReactNative] Add tests on root view, bridge, modules and js context deallocation
This commit is contained in:
parent
88b6df9900
commit
915925db9d
|
@ -47,9 +47,11 @@
|
||||||
|
|
||||||
- (void)invalidate
|
- (void)invalidate
|
||||||
{
|
{
|
||||||
JSGlobalContextRelease(_ctx);
|
if (self.isValid) {
|
||||||
_ctx = NULL;
|
JSGlobalContextRelease(_ctx);
|
||||||
_self = nil;
|
_ctx = NULL;
|
||||||
|
_self = nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -216,10 +218,7 @@ static NSError *RCTNSErrorFromJSError(JSContextRef context, JSValueRef jsError)
|
||||||
|
|
||||||
- (void)invalidate
|
- (void)invalidate
|
||||||
{
|
{
|
||||||
if (self.isValid) {
|
[_context performSelector:@selector(invalidate) onThread:_javaScriptThread withObject:nil waitUntilDone:NO];
|
||||||
[_context performSelector:@selector(invalidate) onThread:_javaScriptThread withObject:nil waitUntilDone:NO];
|
|
||||||
_context = nil;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
|
|
Loading…
Reference in New Issue