Why the rules concerning release?
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.