views:

33

answers:

3

Hi,

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 memory, I don't know why, I didn't release anything...

Thanks for your answers (and sorry for my poor english xD)

A: 

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? :)

d11wtq
Sorry, I tried to translate the word in french xD. Actually I meant that something was written over my object in the memory, so that I cannot access it again. I'm creating my array with "NSMutableArray *myArray = [[NSMutableArray alloc] init];"
Yoot
A: 

Please any idea, I really don't understand what's happening...

Yoot
A: 

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...

Yoot