retain variables between classes
retain variables between classes
- Subject: retain variables between classes
- From: "Jay Rimalrick" <email@hidden>
- Date: Tue, 16 Dec 2003 12:54:01 -0500
I have two classes MainClass and AClass
AClass has a method (with data item array)
-(void)setInfo: (NSMutableArray *)inArray
{
[array release];
[inArray retain];
array = inArray; // also tried array = [inArray mutableCopy]
}
MainClass has an AClass defined and calls this method passing in a mutable
array and when i debug everything is copied fine. However when later
methods and delegates are called of AClass the array it the old one that was
defined in the initial init call. I checked init and it is only being called once so
I am assuming that in the setInfo function I am only copying it for the duration
of the method .... how can I get it to last more than the duration of the setInfo
method?
any ideas are greatly appreciated
-j
________________________________________________________________
Sent via the WebMail system at 1st.net
_______________________________________________
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.