• 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
Why the rules concerning release?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why the rules concerning release?


  • Subject: Why the rules concerning release?
  • From: Mark Patterson <email@hidden>
  • Date: Sun, 1 Aug 2004 09:49:44 +1000

Hi,

I'm trying to get into Obj-C after years in Delphi, so I need to get the new object model clear. Much is similar, but the object life-cycle stuff is confusing. Hillegass say:
* Objects created by alloc or copy have a retain count of 1 and are NOT in the autorelease pool
* Objects obtained any other way have a retain count of 1 and are in the autorelease pool.

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. Why is that not done?

Regards,

Mark
_______________________________________________
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.


  • Follow-Ups:
    • Re: Why the rules concerning release?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Networking in cocoa
  • Next by Date: Re: Password encryption
  • Previous by thread: Re: Networking in cocoa
  • Next by thread: Re: Why the rules concerning release?
  • Index(es):
    • Date
    • Thread