• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cant get Garbage Collection to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Cant get Garbage Collection to work
      • From: "Sherm Pendley" <email@hidden>
    • Re: Cant get Garbage Collection to work
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Bitmaps and color shift
  • Next by Date: Re: A Tab after 4 SPACEs
  • Previous by thread: Re: Bitmaps and color shift
  • Next by thread: Re: Cant get Garbage Collection to work
  • Index(es):
    • Date
    • Thread