Cant get Garbage Collection to work
Cant get Garbage Collection to work
- Subject: Cant get Garbage Collection to work
- From: Dominik Pich <email@hidden>
- Date: Fri, 28 Mar 2008 12:15:46 +0100
Hi,
I started a simple xcode project and wanted to play with GC but cant
get it to work.
First then I set the GCC Flag: Garbage Collection _required_: -fobj-gc-
only
I coded my cocoa document based application as if there were GC... no
retain/release and no dealloc..
I started and bigidibam... over-releases -- guess something got
autoreleased which I ofcourse didnt retain.
So... I added OBJ_PRINT_GC to my environment variables to see if GC
was really on. Sure enough it was.. or is reported as being on.
I also added this 'check' to my awakeFromNib
if([[NSGarbageCollector defaultCollector] isEnabled])
NSLog(@"GC on");
else
NSLog(@"GC off");
and according to that GC is off..
and as I said: I get memory errors so it seems GC is off indeed.
What's my mistake?
_______________________________________________
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