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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:19:23+00:00 2026-06-16T00:19:23+00:00

I have read the docs from apple http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/ProgrammingWithObjectiveC/WorkingwithObjects/WorkingwithObjects.html It says that we can check

  • 0

I have read the docs from apple http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/ProgrammingWithObjectiveC/WorkingwithObjects/WorkingwithObjects.html

It says that we can check if object is null like…

 XYZPerson *somePerson;
    // somePerson is automatically set to nil
 if (somePerson != nil) {
        // somePerson points to an object
    }

Most probably i am doing something wrong but need your help to find what it is.
I have a class C2,I create the C2 object but not initialising,when checking with the code below ,app writes NOT NİL to output.What am i doing wrong.

Thanks for your help.

C2 * o3;

    if (o3 != nil) {
        NSLog(@"NOT NİLLLL");
    }else{
        NSLog(@"NOT");
    }
  • 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-16T00:19:24+00:00Added an answer on June 16, 2026 at 12:19 am

    Unlike members of classes that are zeroed out on initialization, local variables are not initialized automatically by pre-ARC compilers. If you would like your local o3 to be nil, you need to initialize it yourself:

    C2 * o3 = nil;
    

    The behavior of not initializing locals unless explicitly directed by the program comes from C: there, too, the locals are not initialized by default.

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

Sidebar

Related Questions

I have read the HOWTO on Unicode from the official docs and a full,
I have read the Apple documentation, and many postings on the subject on SO,
I have read about NSPasteBoard in the Apple documentation, and how it allows for
Firstly, Kohana's documentation is terrible, before people go read the docs I have read
I read from http://www.packtpub.com/article/friends-via-email-social-web-application-django-1.0 and follow the steps: => And change my setting.py SITE_HOST
I have read the docs about http requests and wrote final this headers: int
I have read the docs and everything but I'm very confused. I never needed
I have read all the docs I can get my hands on and google'd
I have read through the Rails docs for Routing , Restful Resources , and
I've read some docs about the .NET Garbage Collector but i still have some

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.