Array passing between classes, gone?
- by Kenneth
Hey guys . i have two classes, SelectionScreenTable & GraphView.
In the SelectionScreenTable class .h, i declared a NSMutableArray called usagedatas
NSMutableArray *usagedatas;
}
@property (nonatomic, retain) NSMutableArray *usagedatas;
In the SelectionScreenTable class.m i remembered to @synthesize.
Later on, while processing my methods, i did a
NSLog(@"usagedatas count:%i",usagedatas.count);
to check whether it has value and it returned 1. so yeah its good up to this point.
And in the -(void) dealloc , i remembered to released it .
[usagedatas release];
So now comes ME trying to use it in another class.
In GraphView.m i imported the "SelectionScreenTable.h".
in the -(void)viewDidLoad i did
SelectionScreenTable *UD = [SelectionScreenTable alloc];
NSLog(@"GraphView UD.usagedataas.count = :%i",UD.usagedatas.count);
it returned 0.
Any idea guys?