How to release variable in Xcode 4.2?

683 Views Asked by At

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.. :)

1

There are 1 best solutions below

0
Lucas Derraugh On BEST ANSWER

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.