On Jan 18, 2009, at 8:52 PM, Chris Suter wrote:
Are you sure about that? My understanding is that the second case ends
up pointing to a constant string and that retain and release are also
no-ops in that case.
Yah... but that is even more of an implementation detail than the
first and *not* -release'ing something that you +alloc/-init'd would
be asking for trouble.
Pick a pattern. Stick with it. Everywhere. Always.
Until there is a damned good reason not to.
Also, if I remember rightly, that in the first case you'll end up
pointing to a constant in the current translation unit, whereas in the
second case you end up pointing to a global constant defined in
CoreFoundation. Implementation details, I know.
Way too much of an implementation detail for me. I have code to write!
Seriously -- I don't know off hand. I could go read the source and
figure it out, but my general conclusion is that if I have to answer
that particular question, I'm doing something terribly wrong.
b.bum
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com