[CFString release]: message sent to deallocated instance

元气小坏坏 提交于 2019-12-01 04:05:39
Francesco

The answer is trivial and hasn't anything to do with retain counters...

I oversaw that it isn't allowed to name variables/properties starting with new with ARC enabled. This obviously resulted in an over release thus generating the error...

From Apple documentation: https://developer.apple.com/library/ios/releasenotes/objectivec/rn-transitioningtoarc/introduction/introduction.html

To allow interoperation with manual retain-release code, ARC imposes a constraint on method naming:

You cannot give an accessor a name that begins with new. This in turn means that you can’t, for example, declare a property whose name begins with new unless you specify a different getter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!