Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nnavick

macrumors regular
Original poster
Oct 13, 2010
100
0
Hi,
I used NSMutableArray and added 6 objects to the array,when I run the App on the iphone/simulator the app crashes.
When I delete one object from the array ,the app keep running smoothly.

How can I add more than 5 objects to an NSMutableArray ,or should I use another type of array?

one more question,I defined 3 NSMutableArray ,and defined them in the memmory
Code:
FirstLine = [[NSMutableArray alloc] init];
	 SecondLine = [[NSMutableArray alloc] init];
	 ThirdLine = [[NSMutableArray alloc] init];
the app crashes after I run it,what is the problem?
Thank you.
 
I used NSMutableArray and added 6 objects to the array,when I run the App on the iphone/simulator the app crashes.
When I delete one object from the array ,the app keep running smoothly.

How can I add more than 5 objects to an NSMutableArray ,or should I use another type of array?
Of course you can add more than 5 objects to an NSMutableArray. I think you should investigate the cause of the crash more closely. Does anything appear in the console? Have you looked at the crash log? Etc. Apply basic debugging skills.

one more question,I defined 3 NSMutableArray ,and defined them in the memmory
Code:
FirstLine = [[NSMutableArray alloc] init];
	 SecondLine = [[NSMutableArray alloc] init];
	 ThirdLine = [[NSMutableArray alloc] init];
the app crashes after I run it,what is the problem?
Again, you need to investigate the cause of the crash.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.