message to nil? (very basic question)
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