gpt4 book ai didi

ios - 代码调试: Nil object is not Nil

转载 作者:行者123 更新时间:2023-11-28 18:21:12 25 4
gpt4 key购买 nike

我的 xCode 5.0 目前遇到一个奇怪的问题:一个对象在控制台中似乎为 nil,但同时它可以通过代码访问。

pic 1: nil downloader with all properties set to nil pic 1.1: nil

图 1:对象似乎为零

pic 2: output of NSLog图2:NSLog(@"%@", imgDownloader) 的输出不是nil,delegate也正常调用

顺便说一下,我从来没有打算让这个对象为 nil,你可以从代码中看到我按照我应该的方式初始化了这个对象,但不知何故它在控制台中最终变成了 nil。

为什么会这样?这是新 xCode 中的错误吗?

最佳答案

您可能在 Release模式下构建,在方案中将构建模式更改为调试。

关于ios - 代码调试: Nil object is not Nil,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20425592/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com