I am new to collection programming , so i faced this problem . Any help will be thanked …
I Initialized a NSArray instance in a class initialize ( i already define that as a property of that class in header file so i a must can access it any where in that class implementation ) and assign some object to it with
+(NSArray*) arrayWithObjects: ; . every thing in init method is fine but ,…
When i want to work with that array in update method app crashs , because that array DEALLOCATED .
Why that array became deallocated ? How can i prevent it ?
Thanks .
if you are initializing array like this,
its a conventional method, It just auto-release the object after one time the object access. Rather you can
retainthe object or you can allocate and initialize it like