分布式应用程序上的 NSZombie

发布于 2024-08-15 04:21:50 字数 113 浏览 4 评论 0原文

在仍然启用 NSZombie 的情况下编译分发应用程序是否有任何危险?由于它非常有用,我在开发时通常会为我的所有应用程序打开它,但我不了解与启用它并无限期地打开它相关的全部后果和潜在问题。

谢谢!

Is there any danger in compiling an application for distribution with NSZombie still enabled? I generally leave it turned on for all of my apps while developing because of how useful it is, but I don't understand the full ramifications and potential issues related to enabling it and leaving it on indefinitely.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

沩ん囻菔务 2024-08-22 04:21:50

它不是一个编译选项。这是一个环境变量。保留它没有危险,因为它不是您将发布的应用程序包的一部分。

确实使得查找泄漏变得不可能,因此您可能不想将其保持启用状态。

It's not a compile option. It's an environment variable. There is no danger leaving it on, because it is not part of the application bundle you will release.

It does make it impossible to find leaks, so you might not want to leave it enabled.

音盲 2024-08-22 04:21:50

如果您保留它,您的应用程序将不会释放所有使用的内存,因此随着时间的推移,您的应用程序将耗尽设备上的所有 RAM 并被操作系统杀死。

如果您实际上并不是在寻找内存泄漏,为什么要保留它呢?

If you leave it on, your application will not release all the memory used, so over time, your application will use up all the RAM on the device and be killed by the OS.

Why would you leave it on if you aren't actually looking for for a memory leak?

非要怀念 2024-08-22 04:21:50

绝对地。对于 NSZombie,永远无法释放任何内存。释放的对象只会变成僵尸。最终,当你的僵尸堆变得足够大时,你的应用程序将因内存耗尽而崩溃。

Absolutely. With NSZombie, no memory can be freed, ever. Deallocated objects just turn into zombies. Eventually, after your pile of zombies gets big enough, your app will crash from memory exhaustion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文