Hi I have the following code
NSString *analyticsStr = [[NSString alloc] initWithString:[self constructXMLMessage:TagObj]];
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self
selector:@selector(sendAnalyticsString:)
object:analyticsStr];
[operationQueue addOperation:operation];
[analyticsStr release];
//[operation release];
when I uncomment [operation release] my app crashes. And I get this error :
malloc: * error for object 0x726ed50: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug
I was of view that NSOperationQueue takes care of retaining objects. is there something I am doing wrong or not aware of.