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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:16:46+00:00 2026-05-31T07:16:46+00:00

I presume this isn’t a common problem, which makes it a bit more difficult

  • 0

I presume this isn’t a common problem, which makes it a bit more difficult to answer. Any help is appreciated though.

I need to call this delegate a number of times in my app, and i noticed that after a number of times, the delegate starts to come back as NULL (and hence stops responding). I put an nslog everywhere the delegate gets called, so i know that at this point, it’s fine:

UIImage *image = [self.delegate largeThumnailForMediaAtIndex:indexPath.row];

Then the next time this line gets called, the delegate is set to NULL. No lines around it call or set the delegate. I put an NSLog on the setDelegate method too, and that didn’t get called before it changed to NULL.

Any code you might need to see, let me know. Any ideas you want me to try out, let me know about that too.

Thanks for your help.

EDIT: Bizarre, but might help to lead to a solution. I put an NSTimer scheduledTimer.. in the class which gets made the delegate, and got it to fire that once a second so I could see if it turned null at any point. The result i got, however, was that this time it didn’t turn null. It returned all of the delegate methods. When i took the timer out, it goes back to returning NULL. Obviously having a timer in there is an odd workaround ‘solution’. I’m hoping this rings a bell for someone and gives them a clue to where the problem might lie?

EDIT 2: I’ve solved this problem by, instead of using this code in my AppDelegate:

JCreateViewController *create = [[JCreateViewController alloc] init];
    [create.navigationBar addLeftButtonWithTitle:@"Back" type:JButtonTypeArrow];
   create.navigationBar.title = @"Entry #17";
    [self.window addSubview:create.view];

Declaring it in my header file, then using this:

self.create = [[JCreateViewController alloc] init];
    [self.create.navigationBar addLeftButtonWithTitle:@"Back" type:JButtonTypeArrow];
    self.create.navigationBar.title = @"Entry #17";
    [self.window addSubview:self.create.view];

I don’t understand why this makes a difference though. I’d love to know, if anybody does know?

  • 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-31T07:16:48+00:00Added an answer on May 31, 2026 at 7:16 am

    Looks like you’re using ARC. Whatever this object is, nothing owns it. Nothing has a strong reference to it, so it gets released, and then at some point it gets deallocated.

    JCreateViewController *create = [[JCreateViewController alloc] init];
    

    This is a local variable. When the variable goes out of scope at the end of the method, you can’t access that object anymore. Under MRR, this would be a leak. Under ARC, the object is going to die, just like it was in an autorelease pool.

    self.create = [[JCreateViewController alloc] init];
    

    By creating a property (presumably strong) and putting the controller into that property, you’ve given whatever self is an owning reference to the controller. It will now live as long as the property isn’t reassigned or set to nil.

    The timer fixed things because the timer retains its target (which I believe was the controller (your question is rather unclear)), and the timer itself is retained by the run loop. So the run loop keeps the repeating timer alive and the timer kept your controller alive.

    In short, make sure something owns this object and it’ll stick around.

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

Sidebar

Related Questions

I've got a problem which seems simple at first, but really isn't. I'm storing
I have a curl class, called Curl. Let's presume i have this code: $url
I know this is possible to be done using javascript, and I presume I
Say you have records in a text file which look like this: header data1
So I presume this is a memory issue, here's the code: - (NSString *)giveMeAStringGoddammit
I have this (attached)code which works perfectly on all the AVDs I create with
I presume this is a configuration error somewhere, but I can't figure out where.
I presume this is possible? Basically i am receiving using LINQ (LINQ2Entities Entity Framework)
Let's presume that I have string like '=&?/;#+%' to be a part of my
I need to compress portions of our application's network traffic for performance. I presume

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.