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 6068137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:41:00+00:00 2026-05-23T09:41:00+00:00

In the docs for NSManagedObjectContext on the executeFetchRequest:error: method it says it returns an

  • 0

In the docs for NSManagedObjectContext on the executeFetchRequest:error: method it says it returns an array, but it doesn’t mention whether the array is autoreleased or if it has a retain count = 1.

I’m assuming that it’s autoreleased, since it appears to be a convenience method, but wasn’t sure.

Edit Again

facepalm

I was checking the retain count before the autorelease pool had… released it.
Thanks for the tip on not calling retainCount – I’ll avoid it in the future. This is a good case in point where it led me astray.

  • 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-23T09:41:00+00:00Added an answer on May 23, 2026 at 9:41 am

    According to the Object Ownership Policy, only methods prefixed with “alloc”, “new”, “copy” and “mutableCopy” return an object you own. executeFetchRequest:error: is no exception. Therefore, you do not own the returned array and you must claim ownership of it by sending a retain message to it if you need to keep it around. Otherwise, it will get released (at some point in the future).

    The actual value of retainCount is irrelevant.

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

Sidebar

Related Questions

The docs mention :XML, :JSON, and :HTML, but I have a URL that returns
The docs for Dictionary.TryGetValue say: When this method returns, [the value argument] contains the
http://docs.python.org/3.0/whatsnew/3.0.html says it lists whats new , but in my opinion, it only lists
https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis() says: Returns the current time in milliseconds. Note that while the unit of
MSDN docs say that only value types need boxing, but this does not apply
Appengine docs mention a 1Mb limit on both entity size and batch get requests
The docs say: you should implement methods of the form validate:error:, as defined by
The docs vaguely say that it will stick around as long as needed, but
The docs say that the whole subview hierarchy can be created in -loadView. But
DOCS http://developer.yahoo.com/yui/3/event/#eventsimulation . but I do not understand how to do it( So how

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.