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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:58:50+00:00 2026-06-01T00:58:50+00:00

I have a problem. It looks like ARC synchronizes my property with child class.

  • 0

I have a problem. It looks like ARC synchronizes my property with child class.
Here’s the code

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"tableView:didSelectRow: %i", indexPath.row);

    JobDetailViewController *jdViewController=[[JobDetailViewController alloc] initWithNibName:@"JobDetailViewController" bundle:nil];
    jdViewController.delegate=self;
    [jdViewController setJob:[[jobsWithPipes objectAtIndex:indexPath.row] job]];
    [self.navigationController pushViewController:jdViewController animated:YES];
}

The problem is that jdViewController's job property synchronizes with [[jobsWithPipes objectAtIndex:indexpath.row] job]. All properties are nonatomic, retain.
When I’m changing the NSNumber* foreman property in jdViewController the new value copies to parent view controller. Why? It looks like ARC uses copy instead of retain on this objects. Help me please

  • 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-06-01T00:58:52+00:00Added an answer on June 1, 2026 at 12:58 am

    I think your understanding of retain and copy is backwards.

    With a retain property, when you assign a value to it, it gets a pointer to the same object that you assigned. So if you modify one object, it modifies the other.

    With a copy property, when you assign a v alue to it, it gets a copy of the object. So the objects will be identical, but distinct. When you modify one object, it won`t modify the other.

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

Sidebar

Related Questions

I have problem installing simple Windows Service, my code looks like this: using System;
I have a problem with my hibernate mapping using EmbeddedId. My code looks like
It looks like a problem which could have simple solution, but I haven't found
I'm having a problem. I have a UIView, that looks like this : In
am new here. i have a slight problem; PLease look at the following code
The problem looks like this, You have to draw N px width line as
I have a problem that looks like this: My string of text looks like
I have problem in validating Edittext in listview in onFocusChangeListner. My UI looks like
So I got a problem looks like with string conversion. I have tried everything
I have problem with .css file on my JSP page. My page looks like

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.