What am I doing is I am creating lots of UIView in the background and keep them in a NSMutableArray to use later. But when I dismiss the view controller I check the memory in Xcode and it seems some of memory not being released. I checked; view controller is being deallocated.
Check please:
This happend after several showing and dismissing the view controller. Some of them is being released but not all. Thanks.
In dealloc method release all views that you have in the array.
called the below method in your controller dealloc method
I suppose you use arc, so it might be useful to explicitly release this in dealloc.
Using dealloc is a bit like the old days (pre-arc), but it will help you manage memory better. !important! --> NEVER call
[super dealloc];
when using arc!Uncheck
Enable Zombie Objects
option under Edit Scheme. And try again.A zombie is an object that has been deallocated, but references to it still exist and messages are still being sent to it
I think this link has more info for you What is NSZombie?