Questions tagged [narc]
4 questions
13
votes
4 answers
Do you need to release parameters of methods at the end of them in Objective-C?
If I have a parameter passed to a method, do I need to release the parameter at the end of the method?

marty
- 391
- 1
- 7
- 15
3
votes
2 answers
Beyond NARC: When to retain, when to assign, when to copy
I finally understand whether I must release an object, and how to keep my retain counts as low as possible in a trivial application (by knowing whether the object comes back with an extra 'retain' already called or not). So the NARC rules are…

Dan Rosenstark
- 68,471
- 58
- 283
- 421
1
vote
1 answer
Objective C memory leaking
I'm creating one Cocoa application for myself and I found a problem. I have two NSTextFields and they're connected to each other as nextKeyViews. When I run this app with memory leaks detection tool and tab through those 2 textboxes for a while,…

Jakub Lédl
- 1,805
- 3
- 17
- 26
0
votes
1 answer
Why release the NSURLConnection instance in this statement?
I read this in a book.
-(IBAction) updateTweets
{
tweetsView.text = @"";
[tweetsData release];
tweetsData = [[NSMutableData alloc] init];
NSURL *url = [NSURL URLWithString:@"http://twitter.com/statuses/public_timeline.xml" ];
…

Li Fumin
- 1,383
- 2
- 15
- 31