In my app delegate I have a variable which various controllers use (thank to the news group advise on how to access such variable from controllers). Each controller may need to access it more then once. I use this code:
((MyAppDelegate *) [UIApplication sharedApplication].delegate).soundEffects
Ignoring readably issue (as noneone other them me will ever see these src) would it change anything if in the controller init I have I get a pointer to the app delegate object and just access it like so:
... MyAppDelegate *foo = [UIApplication sharedApplication].delegate ... foo.soundEffects ...
It looks like second approach would require more mem storage to hold instance variable foo, while my first approach could be slower to get to the variable.
What is better?
thanks