我刚刚也遇到这个问题,之前也遇到过。
两次的原因都在多release。
例如:
UIButton *soundButton = [UIButton buttonWithType:UIButtonTypeCustom];
便利构造创建的对象,没有通过alloce开辟内存,但是还是用[soundButton release]; 释放结果就出现了:-[CALayer retain]: message sent to deallocated instance的报错。
我刚刚也遇到这个问题,之前也遇到过。
两次的原因都在多release。
例如:
UIButton *soundButton = [UIButton buttonWithType:UIButtonTypeCustom];
便利构造创建的对象,没有通过alloce开辟内存,但是还是用[soundButton release]; 释放结果就出现了:-[CALayer retain]: message sent to deallocated instance的报错。