开发者

remove all objects from NSMutable array

i used following method to rmove all objects from an NSMutableArray

[myData removeAllObjects];

but it gives an runtime error

here is the error

OrgProject(3934,0xa0719500) malloc: * error for object 0x5f5ca30: double free * set a breakpoin开发者_StackOverflowt in malloc_error_break to debug Program received signal: “SIGABRT”

please help...


It sounds like you have released some of object of the array before removing it from this array


It looks like on of the objects was released to often. This often happens when you release an autoreleased object without explicitly retaining it, for example. As the array retains its objects, this bug hides very well until this point.

It should be easy to find out which object is the problem here, and then look how it is created and what retain/release/autorelease messages you send to it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜