-4

Possible Duplicate:
Under automatic reference counting, why are retain, release, and dealloc not allowed?

I want to release variable in xcode 4.2. When i am releasing it throws me an error. The error is Automatic reference counting forbids explicit message send of 'release'

Edited:

Below marked answer worked for me and also I couldn't realize that this question has been asked. Anyways happy coding.. :)

Community
  • 1
  • 1
Akash
  • 94
  • 2
  • 11

1 Answers1

3

This is because you have ARC enabled (Automatic Reference Counting). You can either disable this new feature or learn how to use it. To disable it, click on your project -> your current app target -> Build Settings -> Set Objective-C Automatic Reference Counting to NO.

To learn more about this, you can look at Apple's documentation for Transitioning to ARC.

Lucas Derraugh
  • 6,929
  • 3
  • 27
  • 43