[[NSGarbageCollector defaultCollector] isEnabled] wrong?
[[NSGarbageCollector defaultCollector] isEnabled] wrong?
- Subject: [[NSGarbageCollector defaultCollector] isEnabled] wrong?
- From: Dominik Pich <email@hidden>
- Date: Tue, 5 Feb 2008 21:13:25 +0100
Hi,
I want to assure GC is on for my app. I did try adding PRINT_GC=YES to
my Environment and THAT says that it is indeed on (or atleast that my
app requires it).
objc[3069]: GC: executable '/Users/dominik/Sources/objectiveC/
DimeTracker/build/Debug/DimeTracker.app/Contents/MacOS/DimeTracker'
requires GC
objc[3069]: GC: library '/System/Library/Frameworks/
ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/
Versions/A/CoreText' supports GC
objc[3069]: GC: library '/System/Library/PrivateFrameworks/
CoreUI.framework/Versions/A/CoreUI' supports GC
objc[3069]: GC: library '/System/Library/Frameworks/
QuartzCore.framework/Versions/A/QuartzCore' supports GC
objc[3069]: GC: library '/System/Library/Frameworks/Carbon.framework/
Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox'
supports GC
objc[3069]: GC: library '/System/Library/Frameworks/CoreData.framework/
Versions/A/CoreData' supports GC
objc[3069]: GC: library '/System/Library/Frameworks/
Foundation.framework/Versions/C/Foundation' supports GC
objc[3069]: GC: library '/System/Library/Frameworks/AppKit.framework/
Versions/C/AppKit' supports GC
objc[3069]: GC: library '/System/Library/Frameworks/
CoreFoundation.framework/Versions/A/CoreFoundation' supports GC
objc[3069]: GC: library '/usr/lib/libobjc.A.dylib' supports GC
objc[3069]: GC: is ON
objc[3069]: GC: library '/System/Library/Frameworks/Carbon.framework/
Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels'
supports GC
objc[3069]: GC: library '/System/Library/PrivateFrameworks/
HelpData.framework/Versions/A/HelpData' supports GC
objc[3069]: GC: library '/System/Library/PrivateFrameworks/
Shortcut.framework/Versions/A/Shortcut' supports GC
But asking NSGarbageCollector I get no for an answer:
- (void)awakeFromNib {
if([[NSGarbageCollector defaultCollector] isEnabled])
NSLog(@"GC on");
else
NSLog(@"GC off");
Did I simply not understand the docs right? Or..... is GC always off
during awakeFromNib or something?
Thanks,
Dominik
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden