I have a leak in the following code:
- (void)viewDidAppear:(BOOL)animated {
//If Home-Theme
if (themeIndex == 0) {
NSUserDefaults *pref = [NSUserDefaults standardUserDefaults];
NSMutableArray *thisArray = [[NSMutableArray alloc] init];
thisArray = [[pref objectForKey:@"Themes"] mutableCopy];
[thisArray release];
}
}
the leak is at NSMutableArray.
I have try’d some different workarounds but nothing is help.
Maybe there is someting wrong with the NSUserDefaults?
any ideas?
thank you
xnz
That is leaking since you never release that instance, just assign a new one in the next line. Replace it with: