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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:37:02+00:00 2026-06-07T09:37:02+00:00

@interface ClassA : UITableViewController { NSString *member; } @end The member is declare like

  • 0
@interface ClassA : UITableViewController {

    NSString *member;
}

@end

The member is declare like above.

if I use

NSString * astring = [[NSString alloc] initWithString:@"???"];
member = astring;

Will the member retain the astring?

  • 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-06-07T09:37:04+00:00Added an answer on June 7, 2026 at 9:37 am

    NO it will not retain it. This is instance varaible (also called iVar). It does not release old object and does not retain the new object (as a typical declared property in setter).

    //If property
    self.member = aString; // call setter, equivalent to [self setMember:aString], the old value is released and a retain (or copy depending on property declaration) message is sent to aString.

    If iVar
    member = aString //No memory management.

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

Sidebar

Related Questions

i have a tableview controller like so, NSString *selectedindex; @interface ContactsController : UITableViewController<ABPeoplePickerNavigationControllerDelegate> {
I have a class like so: public abstract class ClassA<T> { protected ClassA(IInterface interface)
Say I have a parent interface/class like so interface Parent<T> {} And a number
In my research I've come across something peculiar. @interface Class { NSString *_string }
Here is the interface of my controller class: @interface ProjectListViewController : UITableViewController <NSFetchedResultsControllerDelegate> {
here is my .h code @interface ROSettingViewController : UITableViewController { UISwitch *switchCtl; UISwitch *switchCtl1;
I am making a UITableView by inheriting UITableViewControll as below @interface addAlarm : UITableViewController
In rootViewController.h i have a property NSMutableArray mainList: @interface RootViewController : UITableViewController { NSMutableArray
code: check it: #import <UIKit/UIKit.h> @interface addsymptom : UITableViewController<UITableViewDelegate, UITableViewDataSource> { NSMutableArray *listData; }
Menu.h @interface Menu : UITableViewController { NSMutableArray *arrayCellCollectionOrder; NSMutableDictionary *dictCellCollection; NSMutableDictionary *dictCellIndividual; } @property

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.