Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:16:58+00:00 2026-05-26T23:16:58+00:00

I read on the web that when I create an object with alloc and

  • 0

I read on the web that when I create an object with alloc and init I have to release it (even a NSString), so:

Why if I create a NSString this way:

NSString *prova = [[NSString alloc] init];
[prova release];

I get these errors:

‘release’ is unavailable: not available in automatic reference counting mode

and

ARC forbids explicit message send of ‘release’

on the [prova release] message? I get no error when I try do this:

NSString *prova = [[NSString alloc] init];
NSLog(@"Contenuto 0 di prova: %@", prova);
prova = @"prima prova stringa";
NSLog(@"Contenuto 1 di prova: %@", prova);
prova = @"ma cosè questo fantomatico errore";
NSLog(@"Contenuto 2 di prova: %@", prova);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:16:59+00:00Added an answer on May 26, 2026 at 11:16 pm

    That’s a best practice previous to iOS 5, or in iOS 5 if ARC mode is disabled. Now iOS 5 uses the new Apple’s LLVM compiler, which introduces this ARC feature.

    So if ARC is enabled (and it is by default), you do not need to use, in general, the release method anymore. You can find more details in documentation.

    If you still want to develop the old way, you can add the flag -fno-objc-arc in “Build phases” section of a Xcode project

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I read that when you don't have access to the web server's headers you
I want to write a program in C/C++ that will dynamically read a web
I read somewhere in the Microsoft documentation that the content of the ASP.NET's web.config
How to read a web server log file in Java. This file is getting
I think I read every single web page relating to this problem but I
I'm currently attempting to read information about an object from the web.config file and
I have searched the web and read through the Boost documentation about shared_ptr .
I have been trying to create a web service out some python scripts, and
I have a legacy web app that I am maintaining. It started out as
I am designing a Web application that we estimate may have about 1500 unique

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.