开发者

Object in NSMutableArray crushed in memory

I have some big problem with an NSMutableArray I'm filling with objects in a database. I'm using [appDelegate.myArray addObject:myObject], then somehow the object gets crushed in the m开发者_如何学运维emory, I don't know why, I didn't release anything.

How that can happen?


How did you create the array? Is it perhaps being autoreleased when you don't want it to be? (i.e. did you create with with +alloc and -init or with +array ?

And yes, what on earth does "crushed" mean in this sense? :)


Sorry, the problem was actually that in my object initialisation method I did something like :

name = @"";
address = @""; ...

instead of :

self.name = @"";
self.address = @""; ...

Be careful to not waste your time with that kind of mistake...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜