Possible Duplicate:
Program received signal: “0”. Data Formatters temporarily unavailable
I am taking above 200 OBShapedButtons on XiB and setting up the background images over there.
After that I am taking the image of that particular OBShapedButton and coloring the image and setting it back again as the background of that OBShapedButton.
-(void)onTick:(NSTimer *)timer {
//Database
UIImage *setColor=[[UIImage alloc] init];
for (int i=0; i<[dataArray count]; i++)
{ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
currentLevelMaleValue =[[[dataArray objectAtIndex:i] objectForKey:@"CurrentLevelMaleColor"] doubleValue];
printf("Current val is %f",currentLevelMaleValue);
for (OBShapedButton *obshapedCountryButtons in scrollBaseView.subviews)
{
if (obshapedCountryButtons.tag==i+1)
{
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapButton:)];
tap.numberOfTouchesRequired=1;
tap.numberOfTapsRequired=1;
[obshapedCountryButtons addGestureRecognizer:tap];
[obshapedCountryButtons addTarget:self action:@selector(buttonTagTrap:) forControlEvents:UIControlEventTouchDown];
//[obshapedCountryButtons addTarget:self action:@selector(tapButton:) forControlEvents:UIControlStateHighlighted];
setColor=[obshapedCountryButtons imageForState:UIControlStateNormal];
countryCode =[self getCountryColorCurrentLevel:currentLevelMaleValue];
setColor =[setColor imageTintedWithColor:countryCode];
[obshapedCountryButtons setImage:setColor forState:UIControlStateNormal];[pool release];
// [setColor release];
// [obshapedCountryButtons release];
// [tap release];
//
}
// }
}
}
}
Now,I am getting this error[After the loop has been executed around 40 times]-
Program received signal: “0”. Data Formatters temporarily
unavailable, will re-try after a ‘continue’. (Unknown error loading
shared library “/Developer/usr/lib/libXcodeDebuggerSupport.dylib
Receiving this warning-
Received memory warning
Then the app is getting terminated.
Note :
No object allocations.
Please help me out with some of your ideas. How should I go ahead ?
is a memory leak as you are not release it. Actually the allocation is not necessary as you are assigning some other values to it. Similarly
tapis also not released as you have commented that code.A suggestion for this. Try to put this block of code in
NSAutoreleasePool.Edit: