-[CALayer retain]: message sent to deallocated instance 0x6b5d890

我刚刚也遇到这个问题,之前也遇到过。

两次的原因都在多release。

例如:

UIButton *soundButton = [UIButton buttonWithType:UIButtonTypeCustom];

便利构造创建的对象,没有通过alloce开辟内存,但是还是用[soundButton release]; 释放结果就出现了:-[CALayer retain]: message sent to deallocated instance的报错。   

猜你喜欢

转载自duchengjiu.iteye.com/blog/1974592