尝试从临时的本地NSMutableDictionary(tmpDict)填充NSMutableDictionary(listContent)但是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");
}
答案 0 :(得分:0)
从LLDB切换到GBD修复此问题。问题是LLBD在初始化并填充对象后,我的字典报告为nil。一旦我切换到GBD,一切都正确地被初始化和保湿。