• 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
Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?


  • Subject: Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
  • From: Greg Parker <email@hidden>
  • Date: Fri, 27 Feb 2009 13:21:17 -0800

On Feb 27, 2009, at 12:58 PM, Tobias Zimmerman wrote:
OK, I'm being dense today, but is it the case that the entire bundle is
marked as GC-required if any piece of it requires GC? If I move the app out
of the bundle (so it is just the Pane and the framework) does that make it
no longer GC-required (if the Framework is compiled as "GC- supported")?


Again, the only parts of my code that touch the system prefs is the Pane and
the framework, neither of which are compiled with GC-required.

The GC-ness marker applies to individual binaries, not bundle packages. So your framework can be marked GC-supported, even if it's inside an app bundle where the app's executable is marked GC- unsupported.


You can use `otool` to verify the GC-ness of your binaries. If the value isn't what you want, double-check your compiler settings and make sure no wrong-GC files leaked in. (The linker should complain when linking files built with incompatible GC, though.)

    % otool -ov -arch i386 /path/to/MyApp.app/Contents/MacOS/MyApp
    [...]
    Contents of (__OBJC,__image_info) section
      version 0
        flags 0x02 GC RR

"RR" is support for non-GC ("retain-release"). "GC" is support for GC. So "GC RR" is GC-supported, "RR" alone is GC-unsupported, and "GC" alone is GC-required.


-- Greg Parker email@hidden Runtime Wrangler


_______________________________________________

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


References: 
 >Re: NSPrefrencePane with Garbage Collection won't work in System Preferences? (From: Tobias Zimmerman <email@hidden>)

  • Prev by Date: Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
  • Next by Date: Where or when do I release this object from this action.
  • Previous by thread: Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?
  • Next by thread: NSFileManager reads from invalid memory
  • Index(es):
    • Date
    • Thread