Re: Thread not registered mystery under GC
Re: Thread not registered mystery under GC
- Subject: Re: Thread not registered mystery under GC
- From: Andy O'Meara <email@hidden>
- Date: Wed, 27 Oct 2010 13:37:01 -0500
>
>
> Andy, also beware that those two functions are not properly marked as
> weak, and so if your deployment target is < 10.6 and even if you test
> them against NULL, you will crash. :( <rdar://8508911>
Yikes, many thanks for the catch there -- this stuff always keep me guessing, sigh.
Thanks Sean for bringing that up and moving the discussion to the reg vs unreg calls -- good thinking and would have never thought to ask that or think about the weak link issue (and good to hear from ya btw!!).
Thanks Bill and Greg for the clarification on the rest. I'm with Sean that the naming seems interesting so I'm curious to know what the public interface may look like down the road. No worries if that stuff is off limits (which I assume it probably is).
Anyway, so my approach here is to detect the OS version at runtime and skip over objc_registerThreadWithCollector() when the OS is earlier than 10.6 -- is that the best approach?
For the record, as a performance/graphics/realtime guy I'm very anti-GC but the fact that the ScreenSaverEngine now requires it under 64 bit doesn't leave us any choice. :( I have always been outrageously curious why the decision was made to make screen savers go the GC route. Realtime, graphic-centric, and performance-senstive computing doesn't seem like the best setting to require GC. Puzzles the heck out of me.
Thanks,
Andy
On Oct 26, 2010, at 3:07 PM, Bill Bumgarner wrote:
>
> On Oct 26, 2010, at 12:42 PM, Sean McBride wrote:
>
>> And presumably objc_unregisterThreadWithCollector() at the end of your
>> thread's function... yes?
>
> Yes; it'll happen automatically on thread death, effectively.
_______________________________________________
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