Is there a reason, other than as may be required by object scope across different methods of the object, to use an object like this:
@interface
...
ViewMgmtAppDelegate : NSObject <UIApplicationDelegate> {
Obj *obj1;
...
}
@end
@implementation
- (void)applicationDidFinishLaunching:(UIApplication *)application {
obj1 = [Obj alloc];
[window addSubview:obj1];
...
}
- (void)dealloc {
[obj1 release];
...
}
@end
Instead of this:
@interface
...
ViewMgmtAppDelegate : NSObject <UIApplicationDelegate> {
...
}
@end
@implementation
- (void)applicationDidFinishLaunching:(UIApplication *)application {
Obj obj1 = [Obj alloc];
[window addSubview:obj1];
[obj1 release];
...
}
- (void)dealloc {
...
}
@end
Is either way more efficient?
Any help appreciated // :)