Object is not deinitialized when the array is deallocated

Hi everyone!

In the page 461 of iOS Apprentice Book, it is written that

"The special deinit method will be invoked when you delete an individual ChecklistItem but also when you delete a whole Checklist — because all its ChecklistItems will be destroyed as well, as the array they are in is deallocated.”

In my try, it seems that the object is destroyed not exactly when the array is deallocated, but in a later time, it happens when user triggers a segue and just before “prepare (for segue:…)” method runs. I wonder what might cause this. Do you have any idea?

This topic was automatically closed after 166 days. New replies are no longer allowed.