Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
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)
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
 

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
ups

forgot to add the screen shot from instruments' leaks. here it comes. Any Ideas? How should I understand the messages from the leak-software?
Thnaks in advance!
MACloop
 

Attachments

  • Bildschirmfoto 2010-04-16 um 09.46.32.png
    Bildschirmfoto 2010-04-16 um 09.46.32.png
    64.6 KB · Views: 104

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
Hallo again,
can someone please tell me how and when I should see the reported leaks from Instruments leaks, as serious and as produced by my code? Are, for instance, those leaks my fault (attachments)? I do not get any indications on where in my code, the problem is created? Please help me to clear this...

QuartzCore mem_alloc seems to grow when I reload a view in my app, what I think is worth to note.

Foundation -[NSCFArray copyWithZone:] is also growing but not that rapidely...

Are those leaks produced by me or are they out of my control, ie produced of the frameworks mentioned....?

Thanks in advance!
MACloop
 

Attachments

  • leaks1.png
    leaks1.png
    279.9 KB · Views: 80
  • leaks2.png
    leaks2.png
    426.3 KB · Views: 73

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
The leaks tool can show you the stack trace of the location that the leaked object was created. You need to look at that as a start to figuring out the leak.

The leaks you show for open_handle_to_dylib_path are probably not real leaks. Can't tell about the others but in general I never see dozens of leaked objects when I run leaks so they probably are real leaks.

Did you run Build and Analyze?
 

MACloop

macrumors 6502
Original poster
May 18, 2009
393
0
Germany
The leaks tool can show you the stack trace of the location that the leaked object was created. You need to look at that as a start to figuring out the leak.

The leaks you show for open_handle_to_dylib_path are probably not real leaks. Can't tell about the others but in general I never see dozens of leaked objects when I run leaks so they probably are real leaks.

Did you run Build and Analyze?

Hello,
yes I did run Build and Analyze and that did not really give me any indication. I am pretty sure that it is a real leak now... I think I have to go on seaching... Thanks for your help!
MACloop
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.