I want to create a static NsMutableData with its own getter setter property,
Where should i initializ and alloct the variable and where should i release it..
when i access the updateData(which consists of xml data) it throws error when retrieving foundCharacters
Where should i initializ and alloct the variable and where should i release it..
Code:
static NSMutableData *updateData;
@implementation DbUpdates
+(void)initialize{
NSLog(@"updatedate initialized");
updateData = [[NSMutableData alloc] init];
}
+(NSMutableData*)getUpdateDate{
return updateData;
}
+(void)setUpdateDate:(NSData*)data{
[updateData appendData:data];
/*
[data retain];
[updateData appendData:data];
*/
}
}
when i access the updateData(which consists of xml data) it throws error when retrieving foundCharacters