试图从临时的NSMutableDictionary ( listContent )中填充一个本地NSMutableDictionary ( tmpDict ),但是listContent的init似乎失败了,因此,tmpDict的内容不能被移植。我做错了什么?
谢谢
声明在我的.h文件中
// .h
NSMutableDictionary *listContent;
...
@property (nonatomic, strong) NSMutableDictionary *listContent;实现文件
- (void)viewDidLoad
{
NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] init];
//-- populating tmpDict here ....
//Bring to life, this dictionary
self.listContent = [NSMutableDictionary new];
//--- self.listContent is still not alive
if(!self.listContent)
NSLog(@"listContent is not alive, yet");
//populate self.listContent with contents of tmpDict
[self.listContent addEntriesFromDictionary:tmpDict];
//--- self.listContent is still not alive
if(!self.listContent)
NSLog(@"listContent is not alive, yet");
}发布于 2012-05-23 11:14:46
从LLDB切换到GBD解决了这个问题。问题是,我的字典在初始化并使用对象填充后被LLBD报告为0。一旦我切换到GBD,一切都被正确地初始化和水化。
https://stackoverflow.com/questions/10689817
复制相似问题