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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:57:23+00:00 2026-05-26T05:57:23+00:00

I have a service object called JSONNetworkUtility, and I store it in my model

  • 0

I have a service object called JSONNetworkUtility, and I store it in my model as an ivar, as well as a synthesized property with the same name, nonatomic and retained:

myNetworkUtility = [[JSONNetworkUtility alloc] initNetworkConnectionWithURL:urlString withQueryString:nil delegate:self];

The delegate includes two callbacks, one is networkUtility:didFailWithError: and the other is networkUtility:didFinishWithData:. The weird thing is that the property is causing some weird errors:

- (void)networkUtility:(JSONNetworkUtility *)networkUtility didFinishWithData:(NSArray *)jsonArray
{
    NSLog(@"myNetworkUtility = %@", myNetworkUtility);
    // returns <JSONNetworkUtility: 0x3944450>

    NSLog(@"networkUtility = %@", networkUtility);
    // also returns <JSONNetworkUtility: 0x3944450>

    NSLog(@"self.myNetworkUtility = %@", self.myNetworkUtility);
    // fails and throws an NSZombie error!
}

The error I get on that line is:

*** -[MyModel myNetworkUtility]: message sent to deallocated instance 0x148190

I’m totally stumped! Any clues as to why it’s failing on a getter? And why is it returning a completely different object?

The reason I’m using a getter is because I wanted to use self.myNetworkUtility = nil so I can write over the top of the property with a new object, but I’ve cut it back to just this trace and I’m still having problems…

Thanks!

  • 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-26T05:57:24+00:00Added an answer on May 26, 2026 at 5:57 am

    I think the problem is that MyModel is deallocated. When you’re accessing the ivar, the objects are still there in that memory address address, the memory is not yet corrupted. But when sending a message to deallocated ‘self’ the runtime catches the fact that the object is deallocated.

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

Sidebar

Related Questions

I have a requirement to load a complex object called Node ...well its not
I have /invoices/ controller and @service object. When /services/1/invoices/new is called, a new @invoice
I have a service method that calls a DAO which then returns an object
I have a WCF service method that expects an object and then retrieves its
I have a web service that returns the binary array of an object. Is
Let's say I have a WCF service which has a method returning object Person.
I have an object I pass to a WCF service. Then on the server,
I have a function that loads a user object from a web service asynchronously.
i have an ASP.NET web service that returning a custom entity object (Staff): [WebMethod]
I have a service called myService.svc. This service is exposed using a webHttpBinding binding.

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.