Hi,
I'm having a problem while developing for iOS. I can't find why I have a memory leak.
If I change this last line to, for example
there is no memory leak discovered. I understand that the problem may be with ferArr array, but I can't figure out exactly why.
Can anyone help me?
Thanks in advance.
I'm having a problem while developing for iOS. I can't find why I have a memory leak.
Code:
NSDictionary *feriadosDictionary = [NSDictionary dictionaryWithContentsOfFile:file];
NSArray *feriadosArray = [feriadosDictionary objectForKey:@"xpto"];
for (int i = 0; i != [feriadosArray count]; i++) {
NSArray *ferArr = [[[NSArray alloc] init] autorelease];
ferArr = [feriadosArray objectAtIndex:i];
if ([ferArr count] == 6) {
Feriado *feriado = [[[Feriado alloc] init] autorelease];
[feriado setData: [ferArr objectAtIndex:0]];
//...
}
If I change this last line to, for example
Code:
[feriado setData: @"something"];
there is no memory leak discovered. I understand that the problem may be with ferArr array, but I can't figure out exactly why.
Can anyone help me?
Thanks in advance.
Last edited: