I am using the instrument provided with XCode 4.3 to detect memory leaks. I am getting a memory leak in the following code line. Not sure why !
self.view.backgroundColor=[[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background-non-retina.png"]];
Can anyone kindly tell me what I am doing wrong here ?
Thanks
backgroundColor=[[UIColoralloc] init...Look carefully where it says
alloc. Anything youalloc,init, ornewyou are required to release. Try using an autoreleased color, such as this: