ARC:“指向没有明确所有权的非常量类型'id'的指针"; [英] ARC: "Pointer to non-const type 'id' with no explicit ownership"

查看:65
本文介绍了ARC:“指向没有明确所有权的非常量类型'id'的指针";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在升级一个iOS 4项目,以便将其与sdk5一起用于ARC. 因此,我想使用自动重构方法将代码转换为使用ARC. 不幸的是,它不起作用.我收到很多错误..

i am upgrading an iOS 4 project to use it with ARC with the sdk5. So i want to use the automatic refactor method for converting the code to use ARC. Unfortunately it does´t work. I get a lots of errors..

for(id* child in childObjectArray){
    [child removeParentGroupReferences];
}

这给了我以下错误输出:

That gives me the following error output:

指向没有明确所有权的非常量类型'id'的指针

Pointer to non-const type 'id' with no explicit ownership

对此有任何帮助吗?我必须改变什么? 感谢您的帮助.

Any help about that? What do i have to change? Thanks for any help..

推荐答案

id*更改为id. id已经定义为对象指针.

Change id* to id. id is already defined as an object pointer.

这篇关于ARC:“指向没有明确所有权的非常量类型'id'的指针";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆