UIWebView-TS_JavaScriptContext icon indicating copy to clipboard operation
UIWebView-TS_JavaScriptContext copied to clipboard

retain cycle

Open SSiming opened this issue 9 years ago • 2 comments

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?

SSiming avatar Apr 21 '16 13:04 SSiming

Yes, it may call retain cycle.
But I don't know why should write "ctx[@"viewController"] = self; " ?

xuyouyang avatar Aug 22 '16 12:08 xuyouyang

you can use other class , ctx[@"viewController"] = [[otherClass alloc] init],then you can fix it

dream4java avatar Nov 30 '17 07:11 dream4java