Re: Question about block, ARC, self, and reference counting.

2012-04-12 Thread Scott Andrew
Cool. Thank you that was sort of my thought. Then went and watched the WWDC video and went into a bit of a panic. Scott On Apr 12, 2012, at 11:18 AM, Ken Thomases wrote: > On Apr 12, 2012, at 12:04 PM, Scott Andrew wrote: > >> I have a question about retain cycles with ARC and blocks. >> >> I

Re: Question about block, ARC, self, and reference counting.

2012-04-12 Thread Ken Thomases
On Apr 12, 2012, at 12:04 PM, Scott Andrew wrote: > I have a question about retain cycles with ARC and blocks. > > I have the following code: > >__weak MyViewController* controller = self; > >[UIView animateWithDuration:.25 animations:^{ >controller.alpha = 0; >} > comp

Question about block, ARC, self, and reference counting.

2012-04-12 Thread Scott Andrew
I have a question about retain cycles with ARC and blocks. I have the following code: __weak MyViewController* controller = self; [UIView animateWithDuration:.25 animations:^{ controller.alpha = 0; } completion:^(BOOL finsihed) { [controller showSta