Array question, Obj-C
Array question, Obj-C
- Subject: Array question, Obj-C
- From: Hisaoki Nishida <email@hidden>
- Date: Fri, 24 May 2002 20:06:36 -0400
Hi,
I have a need to allocate a dynamically allocated array and I was
wondering how I create it in Obj-C? Or, would it be wise to use NSArray?
I am trying to use NSMutableArray to add simple NSNumber objects to it.
Below is how I do it, I want to know if it's the correct way to do it:
NSMutableArray * VCellWallArray; // at init stage
NSNumber * wrapped; // at init stage
LOOP{
. // do some stuff here to get xCount
.
.
wrapped = [NSNumber numberWithInt:xCount];
[VCellWallArray addObject:wrapped];
}
My question is, is VCellWallArray being added the correct xCount value
every time the loop is executed? Is it just adding a pointer and
destroying the link everytime a new value is assigned to wrapped?
Thanks!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.