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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:56:54+00:00 2026-05-16T10:56:54+00:00

This question follows on from a previous question. However stackoverflow presents me from commenting

  • 0

This question follows on from a previous question. However stackoverflow presents me from commenting – like it sometimes prevents me from setting a correct answer on my own question.

Anyway I have some weirdness happening in my application. I have a property:

@property (nonatomic, retain) NSMutableArray *hotelList; //I also synthesize it

This is how I am setting the property:

- (void)populateHotelList
{
    SearchWebServiceController *searchWS = [[SearchWebServiceController alloc]init]; 

    //If I remove this retain the App crashes
    hotelList = [[searchWS getHotelsByRegionCode:@"12345" AndByKid:@"12345"] retain]; 

    [searchWS release];
}

However if I remove the retain my application crashes. But according to Apple documentation I should NOT need to retain it?!

This is the method’s implementation:

- (NSMutableArray *)getHotelsByRegionCode:(NSString *)regionCode 
                                 AndByKid:(NSString *)Kid
{
    NSMutableArray *result = [[NSMutableArray alloc]init];

    ...

    return [result autorelease];
}

Can anyone please help!

  • 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-16T10:56:55+00:00Added an answer on May 16, 2026 at 10:56 am

    Added the self qualifier and it worked.

    self.hotelList = [searchWS getHotelsByRegionCode:@”12345″ AndByKid:@”12345″];

    Thanks to spbfox!

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

Sidebar

Ask A Question

Stats

  • Questions 530k
  • Answers 530k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try this: \$\d+\$ And if you don’t want to allow… May 16, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer int myInt = myBoolean ? 1 : 0; ^^ PS… May 16, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer It seems possible with Menu File, Item Page Setup Tab… May 16, 2026 at 11:41 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

As a follow up to this previous question , I have a Core Data-based
Related to my previous question on this matter, where the file was not being
This is a follow up to a previous question . if I have multiple
I don't have enough Stack Overflow fu yet to have found a previous answer
I'm trying to return a Custom type from a PostgreSQL function as follows: DROP
Please refer to this background question. After constructing this COUNT, how would I then
Some Context From Javascript: The Definitive Guide : When regexp is a global regular
Our solution needs us to work in hierarchies of regions which are as follows.
I can see that this is something that has been troubling a lot of
I encountered this problem when doing some enthusiastic programming. The problem can be expressed

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.