Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: inner classes not possible,(in objc) right?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inner classes not possible,(in objc) right?



On Apr 2, 2005, at 17:36, Clark Cox wrote:
POC certainly does create cycles. If reference counts *every* object
pointer. The only way to have an object pointer not count towards the
reference count of an object is to store it in a void*.

Notably its quite possible to build a GC which resolves cycles on top of RC. AFAIK Python uses something similiar, one ObjC implementation is available as part of libFoundation:


http://www.webweavertech.com/libFoundation/doc/ libFoundation_9.html#SEC10

Its quite possible POC uses something similiar to resolve cycles.

But in general I can confirm the point about the AGC speed vs method based reference counting. Though I have no hard numbers, libFoundation with Boehm-GC "felt" quite a bit faster than with RC (though you need to be quite careful when measuring stuff like this).
The drawback is really that it will always consume more memory (since you always have dead objects hanging around until the next collection). Whether or not this is an issue of course depends on the actual application.


Anyway, all the pro's and contra's of ObjC GC can be read in almost any ObjC newsgroup or mailing list archive. This was discussed meriads of time, I'm rather interested what Tiger might bring here ;->
The only reason why we moved away from Boehm-GC is that it destroyed portability/compatibility with Cocoa Foundation.


Greets,
  Helge
--
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: inner classes not possible,(in objc) right? (From: Jean-François Brouillet <email@hidden>)
 >Re: inner classes not possible,(in objc) right? (From: Clark Cox <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.