kavalerov
kavalerov

Reputation: 390

Object is not released after dealloc

Heapshots show that objects are not released, and at the same time logs show that dealloc was called. i do release all properties and remove all superviews in dealloc. So why memory is still not released?

Upvotes: 0

Views: 146

Answers (2)

Lily Ballard
Lily Ballard

Reputation: 185663

If dealloc was called, but the memory backing the object was not released, there are two possibilities:

  1. You did not call [super dealloc] at the end of your -dealloc (only applies to non-ARC code)
  2. You have Zombies enabled. This can be done either via a checkbox in Instruments (in the configuration for the ObjectAlloc instrument), or via the Diagnostics tab in the Scheme editor.

Upvotes: 1

Catfish_Man
Catfish_Man

Reputation: 41801

Did you (assuming you're not using ARC) call [super dealloc] at the end of your dealloc method?

Upvotes: 1

Related Questions