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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:55:58+00:00 2026-05-22T14:55:58+00:00

alright I am looking for this error since 2 hours and I just cant

  • 0

alright I am looking for this error since 2 hours and I just cant figure it out please help me.
I have the following situation I have 2 viewcontroller.
one presents the other one as modalview like that.

SearchViewController *searchViewController = [[SearchViewController alloc]init];
[searchViewController setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
searchViewController.delegate = self;
searchViewController.senderTag = [sender tag];
[self presentModalViewController:searchViewController animated:YES];
[searchViewController release];

in my searchviewcontroller I do this in the .h file

BSKmlResult *selectedAirport;
@property (nonatomic, retain) BSKmlResult *selectedAirport;

in the .m file i synthesize it and then set it like that

selectedAirport = [self.airportList objectAtIndex:indexPath.row];

and then release it here

- (void)dealloc {
  [selectedAirport release];
  [super dealloc];
}

in the delegate methode of my SearchViewController which is implemented in the first
viewcontroller where I also present the SearchViewController
i have the following

if (controller.selectedAirport) {
            if (departureAirport) {
                [departureAirport release];
            }

        departureAirport = [controller.selectedAirport copy];
}

[self dismissModalViewControllerAnimated:YES];

I narrowed down where the error happens it is in the dealloc of my SearchViewController
[selectedAirport release];

but I cant figure out where my mistake is
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-22T14:55:58+00:00Added an answer on May 22, 2026 at 2:55 pm
    selectedAirport = [self.airportList objectAtIndex:indexPath.row];
    

    You arent retaining selectedAirport here.

    Change it to

    self.selectedAirport = [self.airportList objectAtIndex:indexPath.row];
    

    Since you couldnt find it out, probably you dont know this…

    If you dont access member variables by self.memberVariable, you are not accessing its property. Thus, it was not getting retained.

    Ofcourse you can also retain it by saying

    selectedAirport = [[self.airportList objectAtIndex:indexPath.row] retain];
    

    But whats the use of your property then…

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

Sidebar

Related Questions

Alright. So I figure it's about time I get into unit testing, since everyone's
Alright, I have been doing the following (variable names have been changed): FileInputStream fis
Alright. I have a query that looks like this: SELECT SUM(`order_items`.`quantity`) as `count`, `menu_items`.`name`
Alright here's the situation, I have an application written in the Zend_Framework, that is
Alright so I have this C++ image capturing class. I was wondering if I
Alright so i have been working on this Dynamic load of a spinner from
Newbie :( Tweaking my way through tutorials but 36 hours can't figure this one
Right now I have: s = @/Users/minisquad1/Pictures/; This works alright in my computer. I
Alright, need some help created a query for an Oracle 10g DB. I have
Alright I want to create a .csv file in C#. I have been looking

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.