Hello,
I have a navigationController with some tableViews and have noticed that if I use this with only static values, like showing some details when the user clicks on a cell, there are no leaks detected. If I go on and put some calculations like if some vaiable !=nil -> add something to the view, leaks are detected. Also when I add detectTelefoneNumber or link in texts, leaks are detected. As far as I can see I do release everything I have alloced or retained after I have added it to the view. Any ideas?
for instance:
This is detected as leaking: (red in the code)
Anyone having any ideas? I assume that I do not understand the hints given by the leaks-program but perhabs someone else has any idea?
Thanks in advance!
MACloop
I have a navigationController with some tableViews and have noticed that if I use this with only static values, like showing some details when the user clicks on a cell, there are no leaks detected. If I go on and put some calculations like if some vaiable !=nil -> add something to the view, leaks are detected. Also when I add detectTelefoneNumber or link in texts, leaks are detected. As far as I can see I do release everything I have alloced or retained after I have added it to the view. Any ideas?
for instance:
This is detected as leaking: (red in the code)
Code:
telefonValue = [[UITextView alloc]initWithFrame:CGRectMake(102, 245, 208, 22)];
if([someObject telefonNummer] != nil) {
telefonValue.text = [someObject telefonNummer];
}
...
[COLOR="Red"]telefonValue.dataDetectorTypes = UIDataDetectorTypePhoneNumber;[/COLOR]
telefonValue.font = [UIFont systemFontOfSize:13.0];
telefonValue.backgroundColor = [UIColor clearColor];
telefonValue.textColor = [UIColor darkGrayColor];
telefonValue.editable = NO;
[myScrollView addSubview:telefonValue];
[telefonValue release];
Anyone having any ideas? I assume that I do not understand the hints given by the leaks-program but perhabs someone else has any idea?
Thanks in advance!
MACloop