I am creating a instance of my class here and calling some functions . When i try to rlease the object
after my use i am getting this error Thread 1: Program Recieved signal: EXC_BAD_ACCESS . How can i release the object in a safe way ….
WebServicesiPhone *newsParser = [[WebServicesiPhone alloc] init];
newsParser.splControlleriPhone = self;
[newsParser getData:0:nil:0:0];
[newsParser release];
First you could set up a property and release it in the dealloc method.
Second would be to autorelease that object. It will be released automatically once the object isn’t retained amymore.
This would require you to retain the object where the call is comming from.