What is the difference Memory Leak and a Zombie?

前端 未结 2 516
臣服心动
臣服心动 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:51

    "Zombies" in Objective-C parlance are the opposite of leaks. A leak is a bit of allocated memory that you no longer have any references to, so you can't free it. A zombie is an object that has been deallocated, but references to it still exist and messages are still being sent to it (which can lead to all sorts of unpredictable behavior).

提交回复
热议问题