Closed forgot closed 10 years ago
Thanks for this. I think that the reason may be because alertWindow is not set using the self.
setter (it uses the internal _alertWindow
ivar directly) so clearning it with self.alertWindow = nil
is expected to have no effect since it was not set accordingly. Also note that clearing it was another earlier pull request.
Much of my code that I write now makes use of assigning properties using self. instead. Perhaps I should go through and refactor the code as it's been a while since I have touched it and I'm sure I'll find other nuances where my ObjC has improved since it was written. Maybe the .rootViewController would not need to be set to nil after this. Feel free to experiment yourself, you just need to change it in the init method.
In the demo, when calling
show5StackedAlertViews:
,self.alertWindow
is remaining, even though it is set to nil, and is blocking the main window. I was able to confirm this using Reveal. SettingalertWindow.rootViewController
to nil seems to clear this up.Out of curiosity, would this be due to something holding a reference to
alertWindow
, and not allowing ARC to release it? I'm still trying to get a handle on all this, and while I was able to make it work, I want to make sure I correctly understand how I made it work.