Re: Do I need to relase @"string" ??
Re: Do I need to relase @"string" ??
- Subject: Re: Do I need to relase @"string" ??
- From: Michael Ash <email@hidden>
- Date: Mon, 2 Mar 2009 23:56:45 -0500
On Mon, Mar 2, 2009 at 7:50 PM, Joel Norvell <email@hidden> wrote:
> While it's important to keep Objective C's memory management model and rules in mind, I've found the LLVM/Clang Static Analyzer to be the perfect tool for double-checking my code. It's a lot less neurotic than trying to remember everything, all the time, especially when you're starting out.
>
> Eric Orion Anderson did this very helpful tutorial:
>
> http://www.therareair.com/2008/09/26/tutorial-how-to-static-analyze-your-objective-c-code-using-the-clang-static-analyzer-tool/
>
> http://tinyurl.com/d7p3pp
Note that the clang static analyzer still has many false positives and
false negatives. It is an extremely useful tool, but I would hesitate
to use it as a substitute for remembering the rules. I would
definitely use it as a second check in case you happened to have a
lapse, though.
Also, there's really only one rule. Since they don't want us
rephrasing them on the list, I'll just link to it:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html
There really is just not that much to remember. It's hard at the
beginning, that is true, but my advice is to concentrate on learning
and internalizing it, not finding substitutes for having it in your
brain.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden