Search code examples
iosnszombie

A NSZombie of an odd type


so i am getting a NSzombie and it says this

-[__NSArrayI _cfTypeID]: message sent to deallocated instance

Any idea what that is? assumably an array although i thought if it were an NS type it would say.


Solution

  • Basically that means your NSArray object is already deallocated. Something in Foundation.framework tried to access your NSArray's private method _cfTypeID and crashed.

    And about question why there's _cfTypeID method in NSArray object. NSArray Core Foundation counterpart of CFArray. Two type's are interchangeable with "toll-free bridge". So actually apple uses that method for internal uses. If you want deeper understand of this. You can visit http://code.google.com/p/cocotron/source/browse/Foundation/NSArray/NSArray.m and this is Cocotron's implementation of NSArray. It is not same with the apple's implementation but still implementations are similar.