• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
message to nil? (very basic question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

message to nil? (very basic question)


  • Subject: message to nil? (very basic question)
  • From: Manfred Lippert <email@hidden>
  • Date: Sat, 19 Jan 2002 23:24:15 +0100

Hi,

a very basic question from a Cocoa/Obj-C newbie:

Is it allowed to send a message to nil or will it crash or give some runtime
errors or such things?

Example: Do I have to check for nil, if I release an object?:

if (myObject != nil) { // is this necessary?
[myObject release]
}

Mani


  • Follow-Ups:
    • Re: message to nil? (very basic question)
      • From: Andrew Abernathy <email@hidden>
    • Re: message to nil? (very basic question)
      • From: Thomas Lachand-Robert <email@hidden>
    • Re: message to nil? (very basic question)
      • From: David Remahl <email@hidden>
  • Prev by Date: Re: C++ Compiler
  • Next by Date: Re: message to nil? (very basic question)
  • Previous by thread: Re: C++ Compiler
  • Next by thread: Re: message to nil? (very basic question)
  • Index(es):
    • Date
    • Thread