Home / Vulnerability Database / Objective-C : Dealloc synthesized
Objective-C

Objective-C : Dealloc synthesized

Classification

Overview

Instance variable backing a synthesized property should be released in -dealloc when automatic reference counting is disabled.

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 : Dealloc synthesized 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