__attribute__((NSObject)) not behaving as expected

2014-01-24 Thread Kevin Meaney
Building on and compiling for minimum system of 10.9. Xcode 5.0.1 Using ARC. I have a property declared so: @property (readonly, strong) __attribute__((NSObject)) CGContextRef context I have a designatied initializer defined like so:

Re: __attribute__((NSObject)) not behaving as expected

2014-01-24 Thread David Duncan
Compiler folks could explain this better, but the root issue is that __attribute__((NSObject)) doesn’t do as much as you might expect given the way you’ve declared it. Its better in the long run to just not rely upon it. On Jan 24, 2014, at 10:58 AM, Kevin Meaney k...@yvs.eu.com wrote:

Re: __attribute__((NSObject)) not behaving as expected

2014-01-24 Thread Manfred Schwind
Does ist help, if you assign it this way instead: self.context = theContext; In your original code you're directly accessing the backed instance variable instead of going over the property, so maybe your property-declaration is ignored in this case. Regards, Mani Am 24.01.2014 um 19:58

Re: __attribute__((NSObject)) not behaving as expected

2014-01-24 Thread Kevin Meaney
On 24 Jan 2014, at 19:02, David Duncan david.dun...@apple.com wrote: Compiler folks could explain this better, but the root issue is that __attribute__((NSObject)) doesn’t do as much as you might expect given the way you’ve declared it. Its better in the long run to just not rely upon it.

Re: __attribute__((NSObject)) not behaving as expected

2014-01-24 Thread Kevin Meaney
On 24 Jan 2014, at 19:10, Manfred Schwind li...@mani.de wrote: Does ist help, if you assign it this way instead: self.context = theContext; In your original code you're directly accessing the backed instance variable instead of going over the property, so maybe your property-declaration

Re: __attribute__((NSObject)) not behaving as expected

2014-01-24 Thread David Duncan
On Jan 24, 2014, at 11:12 AM, Kevin Meaney k...@yvs.eu.com wrote: On 24 Jan 2014, at 19:02, David Duncan david.dun...@apple.com wrote: Compiler folks could explain this better, but the root issue is that __attribute__((NSObject)) doesn’t do as much as you might expect given the way