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

  • SEARCH
  • Home
  • 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 6874191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:09:50+00:00 2026-05-27T04:09:50+00:00

I use xcode 4.2 and this use ARC (Automatic Reference Counting). This is not

  • 0

I use xcode 4.2 and this use ARC (Automatic Reference Counting).


This is not memory leak, because ARC send message of ‘release’:

NSNumber *xy = [[NSNumber alloc] init];

But it’s possible to create memory leaks with this:

char *oldString = "Old String";
char newStrig = strdup(oldString);

I wanted to know that other types of memory leaks can be made?
(If is possible without using C or C++)

  • 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-27T04:09:51+00:00Added an answer on May 27, 2026 at 4:09 am

    ARC only applies to Cocoa memory management. If you are casting between Cocoa and CoreFoundation for the toll-free bridge objects there are macros to transfer the memory-management.

    You can leak memory in C, you can leak Core Foundation memory, and the static analyser helps with finding those.

    ARC doesn’t do away with memory management completely. It removes the need to manage memory for Cocoa objects and in some cases (because it can optimise away some retain release calls) is more efficient in managing memory, but you still need to understand memory management for Core Foundation objects, and for C memory.

    You also need to understand Cocoa memory management to understand when to use strong, weak, or copy properties, and when to use Block_copy() and Block_release() on blocks, even though blocks are Cocoa objects and in most cases the correct memory management is handled for you with ARC.

    Again; ARC doesn’t do away with memory management. It simplifies it, and reduces the amount of code you have to write, but you still have to understand what is being done for you behind the scenes, and when you need to manage your own memory.

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

Sidebar

Related Questions

I'd like to use gdb or Xcode's debugger to watch every message sent to
So I'm trying to convert an old project to Automatic Reference Counting. I'm trying
I am refactoring to use ARC in my project and can not figure out
I develop for iOS and use XCode 3.2.5, GCC 4.2. UPD This code works:
I usually use XCode but was having a problem opening a file with this
I just updated a project to make use of ARC with the Xcode 4.2
I am looking for resources (especially video) to show how to use Xcode's interface
I would like to use Apple's Xcode IDE to develop applications on the OS
In Xcode, I can use CMD - R to run (or CMD - Y
I use MacVim as my editor within Xcode. By default Command-B and :make are

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.