All instance variables are by default strong. However, that is not relevant here because
[certifiedTableView reloadData];
is in fact
[self->certifiedTableView reloadData];
and that retains self
, not the instance variable. So you have a retain cycle here,
independent of whether certifiedTableView
is a strong or weak instance variable.
You can solve that with the well-known technique of creating a weak reference to self
:
__weak typeof(self) weakSelf = self;
which is used in the block:
typeof(self) strongSelf = weakSelf;
if (strongSelf != nil) {
[strongSelf->certifiedTableView reloadData];
}
You should also consider to use a property instead of an instance variable.
With self.certifiedTableView
you see immediately that self
is retained.