Inspectopedia Help

Not released ivar

Reports the owned objects stored in the instance variables that are not released.

You take ownership of an object if you:

- create it using a method which name begins with alloc or new or contains copy

- send it a retain message

- set the value of the property that has the retain or copy attribute and is synthesized with the instance variable

To relinquish ownership of an object, you:

- send it a release or autorelease message

- assign nil to the property that is synthesized with the instance variable

If ARC (Automatic Reference Counting) is on, this inspection is disabled. If the checkbox below is switched off, you may release the instance variables in any method of the class. If it's switched on, you may release them in the dealloc, tearDown, applicationWillTerminate:, didTurnIntoFault methods and in any method that can be called from them.

Inspection options

Option

Type

Default

Release should be in 'dealloc' or its callees

Checkbox

true

Inspection Details

Available in:

AppCode 2023.3

Plugin:

AppCode, 2023.3

Last modified: 13 July 2023