Home / Vulnerability Database / Objective-C : Lack of dealloc method
Objective-C

Objective-C : Lack of dealloc method

Classification

OWASP Mobile Top 10 2016

Overview

There is no dealloc method in the class when ARC is disabled. This may cause a memory leak.

The dealloc method frees the memory occupied by the object. This method is automatically called just before the object is deallocated or any of its instance variables are destroyed. When ARC is disabled, you need to add the method dealloc in the implementation of the class, which correctly frees the instance variables. When using ARC, instance variables are destroyed automatically, but it is necessary to override dealloc in order to, for example, remove an object from other services and managers to which it is subscribed, invalidate timers, as well as to release non-Objective-C objects.

MEDIUM

DerScanner Severity Score

Do you want to fix Objective-C : Lack of dealloc method in your application?

See also

Objective-C

Objective-C : Internal information leak

Objective-C

Objective-C : Weak hashing algorithm

Objective-C

Objective-C : Unsafe reflection