• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why the rules concerning release?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Why the rules concerning release? (From: Mark Patterson <email@hidden>)

  • Prev by Date: Re: NSTableView like iTunes
  • Next by Date: Custom Composite Operators?
  • Previous by thread: Why the rules concerning release?
  • Next by thread: Re: Password encryption
  • Index(es):
    • Date
    • Thread