What is the difference Memory Leak and a Zombie?

前端 未结 2 538
臣服心动
臣服心动 2020-12-29 07:53

I am working on a ARC based project . I have never worked on Non ARC based project .Recently I

came across a zombie in my ARC enabled project.As far as I understood

2条回答
  •  旧巷少年郎
    2020-12-29 08:35

    There are several possibilities and it's hard to know what's going on without seeing code. The "message passed to a deallocated instance" error means that you have a pointer that points to where an object had been, but has since been deallocated. This can and does still happen with ARC. It can happen because you have some non-ARC code (or perhaps Core Foundation stuff) interacting with ARC code and things are going awry at the hand-offs. It can also happen because while ARC picks the correct points in time to release objects nearly every single time, it's not perfect (usually there are ways to work around these instances).

提交回复
热议问题