In this case, weakself is needed to avoid retain cycle
[self showMethodA:^{
[weakself showMethodB];
}];
Will this case cause a retain cycle?
[super showMethodA:^{
[self showMethodB];
}];
In this case, weakself is needed to avoid retain cycle
[self showMethodA:^{
[weakself showMethodB];
}];
Will this case cause a retain cycle?
[super showMethodA:^{
[self showMethodB];
}];
Does it create a cycle? Only if showMethodA stores the block into self.
"super" vs. "self" only affects the dispatching, calling the superclass showMethodA instead of self's own showMethodA. It doesn't affect cycles. And whether a cycle is created or not depends on the code in showMethodA.
Yes it will create retain cycle.
You only create a retain cycle if you actually store the block (because self points to the block, and block points to self).
Refer below link for more info :