Is dealloc
guaranteed to be called on the same thread that created a NSObject
instance? For example, if I call [[MyFluffyBunny alloc] init]
on the main thread, is dealloc
guaranteed to also be called on the main thread, or can it be called on any thread once MyFluffyBunny
is no longer retained?
I see sporadic crashes in my app that points to that it's not guaranteed, but I've been unable to find any documentation confirming it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…