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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:37:00+00:00 2026-05-20T01:37:00+00:00

I have the following line in my view controller: -(void) retrieveAccounts { accounts =

  • 0

I have the following line in my view controller:

-(void) retrieveAccounts {
    accounts = [[NSMutableArray alloc] init];
    selAccounts=[[NSMutableArray alloc] init];
    NSString *url=[NSString stringWithFormat:@"https://host/accts"];
    processor=[[AsynConnectionProcessorController alloc] init];
    processor.delegate=self;
    processor.server=self.server;
    [processor createRequestfromURL:url];
}

The AsynConnectionProcessorController class creates an NSURLConnection to load data from a url in asynchronous mode. It creates a connection in the createRequestfromURL method. Later when page is received comepltely in connectionDidFinishLoading I invoke a processData method on the delegate I set in above snippet. processData updates the tableView and so on.

My question is when I can release the processor variable created above. Should I be calling autorelease. Will the control come to next line of code if I put [processor release] after this line above:
[processor createRequestfromURL:url]

Note: I have a similar question before but this one has more specifics so adding it as a separate question here.

  • 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-20T01:37:00+00:00Added an answer on May 20, 2026 at 1:37 am

    It sounds like you need the processor until the delegate call that does processData. Here’s what I usually do:

    1. Declare your delegate protocol such that a reference to the object that makes the call is in the method, e.g. connectionProcessor:didProcessData:
    2. In the delegate callback, invoke release on the reference passed back in the callback.

    This way the delegate decides when it’s done with the object.

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

Sidebar

Related Questions

I have a method like the following: - (void)add:(id)sender { MyAddViewController *controller = nil;
I have the following in a view controller (where webView is an instance variable
I have a view controller, which creates 2 view controllers inside it. Inside each
I have a new view controller on the iPhone which I call using the
In a ViewController I have the following: - (void)viewWillAppear:(BOOL)animated { DataObject *theDataObject = [self
I have following code which add BackButton on my view's navigation item's tabbar. It
Hi there I have the following action in my controller [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index()
I have the following view: @model ViewModels.Shared.BaseViewModel <div class=rep_tb0> <div class=rep_tr0> <div class=rep_td0>@Html.LabelFor(model =>
I have the following problem while i scroll the table view: NSCFString objectAtIndex:]: unrecognized
I'm working on a simple note-taking/painting app. I have a view controller that works

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.