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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:57:40+00:00 2026-05-20T12:57:40+00:00

I observed the following behavior on my instances of NSManagedObject. ObjA is an instance

  • 0

I observed the following behavior on my instances of NSManagedObject.

  1. ObjA is an instance of NSManagedObject loaded from NSManagedObjectContext ContextA.
  2. I retain ObjA
  3. I access PropertyA of ObjA (ObjA has no relationships, only basic properties) – all works fine at this stage
  4. I delete ObjA from ContextA
  5. I save ContextA
  6. ObjA is not deallocated (because of the extra retain I performed on it). I can still check it’s retainCount for example.
  7. I access PropertyA of ObjA -> I get SIGABRT

I’m wondering whether this is the way CoreData was designed to work or a side effect from my code.

  • 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-20T12:57:41+00:00Added an answer on May 20, 2026 at 12:57 pm

    Just like this question you ask about holding onto NSManagedObjects after you have told the store they are deleted. The NSManagedObject docs say “t is important to remember that Core Data reserves exclusive control over the life cycle of the managed object (that is, raw memory management).” Copy the information you need, don’t use a managed object after you have told the store it is released (deleted from the store), because it really is.

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

Sidebar

Related Questions

I'm using the new print from Python 3.x and I observed that the following
I observed the following behavior while working with the perl code base (on branch
I have observed the following behavior under Ubuntu 12.04: On a system with 24GB
With great surprised I observed the following behavior today: Given a class class Foo
I have observed the following behavior in Firefox 4 and Chrome 7: If the
I observed some strange behavior regarding injecting EntityManager. Following is stripped down version of
With a third party API I observed the following. Instead of using, public static
The Situation I'm getting the following inconstant behavior on my application: One in about
My tentative answer is no, as observed by the following test code: #include <functional>
Currently, I observe in hbernate3, the following behavior. if I have @BatchSize(size=5) set, then

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.