ARC Engineering can override the Dealloc method and be called by the system, but do not need to manually call the parent class Dealloc, the handwritten [super Dealloc] method will error, in fact, the system will automatically help you call the parent class Dealloc method, do not need you to implement. You can see if the controller is freed by printing the log in the Dealloc method.
The controller is released after being moved out of the stack by the pop, but sometimes it is found that the controller does not call the Dealloc method when it is out of the stack, in the final analysis, because the current controller is strongly referenced by an object, the controller reference count is not 0, the system can not help you to release this part of memory.
Nstimer is not destroyed in the controller
When there is a nstimer in the controller, you need to be aware, because when [Nstimer scheduledtimerwithtimeinterval:1.0 target:self selector: @selector (updatetime:) Userinfo:nil Repeats:yes]; When this/target:self/increases the retarncountr of the VC, if you don't invalidate the timer, you don't want to call Dealloc. Need to nstimer the controller to be destroyed before viewwilldisappear.
The agent in the controller is not a weak property
For example @property (nonatomic, weak) idIf the Proxy property is set to strong, it means that delegate also has a strong reference to the view controller, which can cause circular references. Causes the controller to not be released and eventually causes a memory leak.
Circular reference of block in controller
The block will make a strong reference to all objects inside it (under ARC)/PS:MRC will retain plus 1/, including the current controller self, so there may be problems with circular references.
That is, an object has a block property, but the block attribute also refers to the other member variables of the object, then the variable itself will be strong application, then the object itself and his own block property formed a circular reference. Under Arc it needs to be modified like this: (/That is, to generate a weak reference to its own object /)
That is, for the sake of insurance, all of the blocks involved in self are replaced with weakself.
Release issues for controllers in iOS