错误:*** -[CALayer 保留]:消息发送到已释放的实例 0xdaa54d0

发布于 2024-10-21 22:21:29 字数 1009 浏览 6 评论 0原文

我正在开发简单的 iPhone 应用程序。我正在研究两种观点。我首先推送了另一个视图控制器,当我删除当前视图以返回到旧视图控制器时,我得到了 [CALayer 保留]。 EXEC_BAD_ACCESS

在 gdb 中,我尝试了 backtrace 命令来查看下面给出的问题,但我找不到任何问题。如果有人能帮助我解决这个问题,那就太好了。

(gdb)回溯

#0  0x02e21434 in ___forwarding___ ()
#1  0x02e209f2 in __forwarding_prep_0___ ()
#2  0x02dc7f58 in CFRetain ()
#3  0x02dc7a65 in CFArrayCreate ()
#4  0x02dfe043 in -[__NSPlaceholderArray initWithObjects:count:] ()
#5  0x0296eda3 in -[CALayerArray copyWithZone:] ()
#6  0x02ea380a in -[NSObject copy] ()
#7  0x004f742a in -[UIView dealloc] ()
#8  0x00214cb2 in NSPopAutoreleasePool ()
#9  0x004d3698 in _UIApplicationHandleEvent ()
#10 0x035fe17c in PurpleEventCallback ()
#11 0x02df289c in CFRunLoopRunSpecific ()
#12 0x02df18a8 in CFRunLoopRunInMode ()
#13 0x035fc89d in GSEventRunModal ()
#14 0x035fc962 in GSEventRun ()
#15 0x004d1372 in UIApplicationMain ()
#16 0x00002074 in main (argc=1, argv=0xbffff020) at /Users/jtong/Desktop/Elle/main.m:14

谢谢, 阿比

I am working on simple iphone application. where i am working on two views. I pushed the other view controller first and when i am removing the current view as to go back to the old view controller i am getting [CALayer retain]. EXEC_BAD_ACCESS.

In gdb, i tried backtrace command to see the problem which i have given below, but i am not able to find any. If anyone can help me out with this it will be great.

(gdb) backtrace

#0  0x02e21434 in ___forwarding___ ()
#1  0x02e209f2 in __forwarding_prep_0___ ()
#2  0x02dc7f58 in CFRetain ()
#3  0x02dc7a65 in CFArrayCreate ()
#4  0x02dfe043 in -[__NSPlaceholderArray initWithObjects:count:] ()
#5  0x0296eda3 in -[CALayerArray copyWithZone:] ()
#6  0x02ea380a in -[NSObject copy] ()
#7  0x004f742a in -[UIView dealloc] ()
#8  0x00214cb2 in NSPopAutoreleasePool ()
#9  0x004d3698 in _UIApplicationHandleEvent ()
#10 0x035fe17c in PurpleEventCallback ()
#11 0x02df289c in CFRunLoopRunSpecific ()
#12 0x02df18a8 in CFRunLoopRunInMode ()
#13 0x035fc89d in GSEventRunModal ()
#14 0x035fc962 in GSEventRun ()
#15 0x004d1372 in UIApplicationMain ()
#16 0x00002074 in main (argc=1, argv=0xbffff020) at /Users/jtong/Desktop/Elle/main.m:14

Thanks,
Aby

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

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

发布评论

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

评论(2

真心难拥有 2024-10-28 22:21:29

听起来您还明确发布了已经自动发布的内容。

Sounds like you're also explicitly releasing something that you've already autoreleased.

多孤肩上扛 2024-10-28 22:21:29

使用仪器并启用僵尸。这将跟踪每个对象的保留和释放位置,并帮助您诊断额外释放发生的位置。

如何使用 Zombies 工具运行 iPhone 程序?

Use Instruments and enable Zombies. This will trace where each object was retained and released and will hell you diagnose where the extra release is occurring.

How to run iPhone program with Zombies instrument?

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