another releasing related question
another releasing related question
- Subject: another releasing related question
- From: "Jay" <email@hidden>
- Date: Wed, 18 Apr 2007 12:36:11 +0800
Consider the following code,
NSValue *A= [NSValue valueWithPoint:B];
NSDictionary *C= [NSDictionary dictionaryWithObject:A forKey: "A"];
[viewNoteCenter postNotificationName:MSG_A object: self userInfo:C];
This is the code I used to send out notifications, THE QUESTION is, should I release the pointer A? Since I created it at first, and according to the reference for NSDictionary, each object added to the dictionary receives a "retain" message, in order to prevent it from deallocated before the dictionary is through with it. In this way, should I release it or just leave it alone?
regards,
Jay
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden