我的问题是关于添加到-postNotificationName:object: userInfo:
方法中的对象。
NSNotification 是否保留对象? (以类似于 NSMutableDictionary 或 Array 的方式)......这意味着我可以在发布通知后释放对象
下面是帮助描述我的问题的代码片段......释放对象是否有效。指向 Apple 文档的链接可能会很有帮助。
NSMutableDictionary *teamDictCopy = [self.teamDict mutableCopy];
[teamDictCopy setObject:[NSNumber numberWithInt:self.scrollViewIndex] forKey:@"imageIndex"];
if([self.statusButton.title isEqualToString:@"Completed"]){
[[NSNotificationCenter defaultCenter] postNotificationName:@"UnComplete" object:teamDictCopy userInfo:nil];
}
[teamDictCopy release];