UIWebView-TS_JavaScriptContext
UIWebView-TS_JavaScriptContext copied to clipboard
retain cycle
Thanks for sharing this。
-
ctx[@"viewController"] = self;
This may be call retain cycle, I tried a lots of ways to solve that, but failed. Other ways we can use block or ctx[@"viewController"] = [self class] to replace the above. Is there any ways can solve that?
Yes, it may call retain cycle.
But I don't know why should write "ctx[@"viewController"] = self; " ?
you can use other class , ctx[@"viewController"] = [[otherClass alloc] init],then you can fix it