Re: "Constant" strings are static or autoreleased?
Re: "Constant" strings are static or autoreleased?
- Subject: Re: "Constant" strings are static or autoreleased?
- From: Lance Bland <email@hidden>
- Date: Wed, 5 Mar 2003 16:10:44 -0500
On Wednesday, March 5, 2003, at 03:55 PM, sinclair44 wrote:
>
Ok, I was partially wrong. But don't they behave the same when using
>
them?
yes, because the memory management is suppose to be .... transparent?
obvious? implicit? unimportant? a unneeded implementation detail?
but that doesn't prevent people from wanting to know about it, or
making mistakes when they don't understand it.
so although it behaves the same, the more understanding, the less
errors.
also, there is a distinction between autorelease v.s. constant in that
if you create many autorelease objects then the memory pool grows and
becomes less efficient (ah, those implementation details), and the
"scope" of autorelease is usually greater than constant (file scope),
indicating a more fragile usage issue.
-lance
------------------------------------
Lance Bland
mailto:email@hidden
VVI Is The #1 Visual-Report Tool Developer For Mac OS X
http://www.vvi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.