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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:49:40+00:00 2026-06-15T03:49:40+00:00

I am working on a ARC based project. I have declared a property for

  • 0

I am working on a ARC based project.

I have declared a property for tableView as follows

@property (weak, nonatomic) IBOutlet UITableView *logTable.

In the ViewDidLoad I do the following

 - (void)viewDidLoad
{
    [super viewDidLoad];

    [self.logTable.layer setCornerRadius:8.0f];//First Method

   /////OR

    [logTable.layer setCornerRadius:8.0f]; //Second Method

}

My question is, which is the best method i.e First or Second in my case?

I am aware that when we don’t use self , we are directly accessing the ivar.But will it make

any difference in case of Weak properties.

EDIT:

Suppose if I have a strong Property as follows

@property(strong,nonatomic)NSArray *dataArray;

As far as I know , this will cause the memory leak

self.dataArray =[[NSArray alloc]init];

So which approach to be followed in this case ?

Any help is greatly appreciated.

  • 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-15T03:49:41+00:00Added an answer on June 15, 2026 at 3:49 am

    I suggest using self. for properties unless there’s a necessary reason not to, such as inside a custom access method. It results in code that requires less analysis when you come back to read it at some future time and it has less chance of bugs if you decide to change the property attributes some day.

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

Sidebar

Related Questions

I am working on a ARC based project . I have never worked on
I am working on ARC based project . My outlets are declared using unsafe_unretained
I am working on a ARC based project. My project is targeted IOS 4.3.
I am working on a ARC based project. I am just wondering what is
I have a question regarding how ARC works. I have started working on IOS
I'm Working on a project that uses ARC and I am having trouble with
I'm trying to get LazyTableImages working with Storyboards and ARC. My project compiles and
I have been working on a project for some time now, and I decided
I am working on an iOS SDK 4 project with ARC enabled. My class
I am working on a visualization project. Based on my data I am plotting

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.