> On 2016 Dec 7, at 6:27, Carl Hoefs wrote:
>
>>
>> On Dec 6, 2016, at 1:33 PM, Carl Hoefs
>> wrote:
>>
>>> On Dec 6, 2016, at 1:24 PM, David Duncan wrote:
>>>
>>> Your safest bets are to either clear
> On Dec 6, 2016, at 1:33 PM, Carl Hoefs wrote:
>
>> On Dec 6, 2016, at 1:24 PM, David Duncan wrote:
>>
>> Your safest bets are to either clear the delegate of the layer at an
>> appropriate time (possibly in your view controller’s
> On Dec 6, 2016, at 1:24 PM, David Duncan wrote:
>
> Your safest bets are to either clear the delegate of the layer at an
> appropriate time (possibly in your view controller’s dealloc is all that is
> necessary), or to use a UIView instead of a raw CALayer in this
> On Dec 6, 2016, at 11:51 AM, Doug Hill wrote:
>
> I've wondered about this before, but maybe some Objective-C runtime experts
> know.
>
> Does writing directly to the ivar backing a property bypass the ARC features
> of the property. For example, will a strong property
> On Dec 6, 2016, at 11:44 AM, Carl Hoefs
> wrote:
>
> I get the following crash in my iOS 9 app simply by adding a CALayer to the
> current view controller's self.view.layer and then dismissing the current
> view controller. Simplified code:
>
>@property
FWIW, it still crashes if I change the code to use self.layer instead of _layer:
@property (strong,nonatomic) CALayer *layer;
. . .
self.layer = [[CALayer alloc] init];
[self.layer setDelegate: self];
[self.view.layer addSublayer:self.layer];
-Carl
> On Dec 6, 2016, at 12:51
I've wondered about this before, but maybe some Objective-C runtime experts
know.
Does writing directly to the ivar backing a property bypass the ARC features of
the property. For example, will a strong property be retained if you write
directly to the ivar?
If not, that's your problem.
Doug
I get the following crash in my iOS 9 app simply by adding a CALayer to the
current view controller's self.view.layer and then dismissing the current view
controller. Simplified code:
@property (strong,nonatomic) CALayer *layer;
. . .
_layer = [[CALayer alloc] init];
[_layer