Just a quick question for any of you Objective-C programmers out there:
How do you determine if a pointer hasn't been allocated to an object?
For example, say I had the following declaration:
I originally thought it would be something like:
Anyone any ideas?
How do you determine if a pointer hasn't been allocated to an object?
For example, say I had the following declaration:
NSAttributedString *attribStringI have coded a few If statements that *may* point that pointer to a new NSAttributedString object, but how would I be able to test if this pointer has actually been "pointed"? :P
I originally thought it would be something like:
if(attribString)but that returns true no matter what, and so does
if(attribString!=NULL)and
if(attribString!=Nil)and
if(attribString!=nil)It returns true in every case!
Anyone any ideas?