Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I release an object anymore? [duplicate]

After I updated to Xcode 4.2, I can no longer release anything. When I start typing "release" it suggest "release" but with a red line across.

If I write it anyway it shows an error and displays these two messages:

'release' is unavailable: not available in automatic reference counting mode Automatic Reference Counting forbids explicit message send of 'release'

Does anyone know what I can do?

like image 828
Eksperiment626 Avatar asked Jul 14 '11 10:07

Eksperiment626


People also ask

How do you duplicate an object?

An object can be duplicated in Adobe Illustrator by copying it (Command / Ctrl + C) and pasting it to the front (Command / Ctrl + F) and to the back (Command / Ctrl + B).

How do you duplicate an object in Indesign?

Use the Duplicate command to replicate a selected object instantly. The new copy appears on the layout slightly offset down and to the right from the original. Select an object or objects, and choose Edit > Duplicate.

What is the shortcut for repeat duplicate object?

If you want to duplicate something you can copy (CTRL+C) and paste (CTRL+V). But there's a quicker way that only requires one shortcut: CTRL+D.


2 Answers

You need to turn off Automatic Reference Counting. You do this by clicking on your project in the navigator (the top item in the finder-like thing on the left), then click on your target, select "Build Settings" and turn off the option "Objective-C Automatic Reference Counting" (you can use the search field on the upper right to search it).

Another possibility is to migrate your project to ARC.

like image 57
DarkDust Avatar answered Oct 14 '22 21:10

DarkDust


Thanks... its CLANG_ENABLE_OBJC_ARC .. you need to make it NO available under Build Setting. Actually I got this error after updating to Cordova from Phonegap. I hope I wont get into more troubles by doing so.. Cheers.. Happy Coding!!

like image 38
Hardik Thakkar Avatar answered Oct 14 '22 22:10

Hardik Thakkar