NSMutableDictionary <-- setter method
NSMutableDictionary <-- setter method
- Subject: NSMutableDictionary <-- setter method
- From: "Frederick C. Lee" <email@hidden>
- Date: Wed, 28 Apr 2004 10:53:45 -0700
Greetings:
I'm trying to write a setter method for a NSMutableDictionary
instance variable. I understand that I can't merely do an equality
assignment such as:
- (void) setCities: (NSMutableDictionary *) theCities {
Cities = theCities; // Wrong.
}
However, I don't see a 'copy' method available to this class; didn't
work.
So I discovered this:
- (void) setCities: (NSMutableDictionary *) theCities {
[Cities setDictionary:theCities];
[theCities release]; ----- ?
}
Is this the correct approach? Should I release 'theCities'?
[theCities release]; ?
Thanks in advance.
Ric.
_______________________________________________
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.