iphone 如此设置全局变量,为何?
为什么要像下面那样设置全局变量,理由何在?
#import "ServiceBase.h"
NSString *ServerAddress = nil;
NSString *UserName = nil;
NSString *Password = nil;
NSString *SessionID = nil;
@implementation ServiceBase
@synthesize connection;
@synthesize responceData;
@synthesize delegate;
- (void)dealloc {
[responceData release];
[connection release];
[super dealloc];
#import "ServiceBase.h"
NSString *ServerAddress = nil;
NSString *UserName = nil;
NSString *Password = nil;
NSString *SessionID = nil;
@implementation ServiceBase
@synthesize connection;
@synthesize responceData;
@synthesize delegate;
- (void)dealloc {
[responceData release];
[connection release];
[super dealloc];