Re: Why the rules concerning release?
Re: Why the rules concerning release?
- Subject: Re: Why the rules concerning release?
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 1 Aug 2004 12:29:08 -0700
On Jul 31, 2004, at 4:49 PM, Mark Patterson wrote:
Can someone explain the thinking behind this. Is there a good reason
or a historical reason for this duality? It might be nice of alloc and
copy autoreleased their objects as well, for consistency.
Regarding consistency:
The rules are consistent:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
Tasks/MemoryManagementRules.html>
In a limited and well-defined set of cases, you can expect to receive a
non-released object.
Regarding autorelease pools:
Nested Autorelease Pools:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
Concepts/AutoreleasePools.html>
"Autoreleased objectsthat is, objects which have received an
autorelease message or which are added through the addObject: class
methodare always put in the autorelease pool at the top of the stack."
mmalc
_______________________________________________
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.