NSMutableArray

Discussion in 'iOS Programming' started by Nnavick, Dec 7, 2010.

  1. Nnavick macrumors regular

    Joined:
    Oct 13, 2010
    #1
    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.
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    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.

    Again, you need to investigate the cause of the crash.
     

Share This Page