So it appears (to me) that a full-blown GC which can collect any
Obj-C type is possible. I've read speculation that there would be a
separate pool type for GC objects, the last sentence of that
comment seems to confirm that -- being able to reference GC'able
objects from "standard" objects & vice-versa.
This has been in the Foundation reference for a while:
void *NSAllocateCollectable(unsigned long size, unsigned long options)
Allocates size bytes and returns a pointer to the allocated memory.
options can be 0 or NSScannedOption: A value of 0 allocates
nonscanned memory; a value of NSScannedOption allocates scanned memory.
This function returns NULL if it’s unable to allocate the requested
Available in Mac OS X v10.4 and later.
void *NSReallocateCollectable(void *ptr, unsigned long size, unsigned
92928794 T _NSAllocateCollectable
92a1e810 T _NSCollectedScannedZone
92a1e850 T _NSCollectedUnscannedZone
9295af60 T _NSReallocateCollectable
And from nm CoreFoundation:
9087a754 S CFMakeCollectable.eh
907ef8c4 T _CFMakeCollectable
90849298 t __CFStringCreateCopyCollected
90848e4c t __CFStringCreateCopyCollected
a07b925c d ___CFCollectableZone
a07b9260 D ___CFObjCIsCollectable
a07b926c D ___CFObjCMemmoveCollectable
a07b9210 D _kCFUseCollectableAllocator
9084616c t _objc_isCollectable_nope
00000000 a objc_isCollectable_nope.eh
It looks like GC is available in Tiger as well, but is not documented...
First they ignore you, then they laugh at you, then they fight you,
then you win.
- Mahatma Gandhi
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