ARC doesn't automatically deduct strong ownership when using __attribute__((NSObject))
| Originator: | steipete | ||
| Number: | rdar://20272376 | Date Originated: | 24-Mar-2015 09:00 AM |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: ARC doesn't automatically deduct strong when using __attribute__((NSObject)) Steps to Reproduce: Open example, see that it crashes. Changes the line: @property (nonatomic) __attribute__((NSObject)) CGGradientRef maskGradientRef; to @property (nonatomic, strong) __attribute__((NSObject)) CGGradientRef maskGradientRef; for the fix. Also observe that strong is automatically inferred from any other object type. Expected Results: __attribute__((NSObject)) should imply strong ownership by default, unless set otherwise. Actual Results: assign is implied, thus crashing. Notes: We shipped crashing UI code because of this unexpected behavior.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!