Reputation: 41
I have found that after calling [self performSelector:@selector(method1:) withObject:self.tableView afterDelay:3];
that self.tableView
's retainCount
changes? Why?
Thank you very much!
Upvotes: 1
Views: 1016
Reputation: 41005
You shouldn't have to worry about it - tableView will be retained while the selector is waiting to be executed and then automatically released again after it has executed. This won't cause leaks or crashes.
Upvotes: 1
Reputation: 8855
I believe the retain could of your table view would be incremented because calling performSelector: withObject: afterDelay:
retains the parameter so that it isn't gone when the method finally is executed. Documentation here.
Upvotes: 2