Re: returning from within @synchronized results in warnings
Re: returning from within @synchronized results in warnings
- Subject: Re: returning from within @synchronized results in warnings
- From: Jonathan Dann <email@hidden>
- Date: Fri, 14 Aug 2009 14:49:11 +0200
On 12 Aug 2009, at 15:02, Ken Thomases wrote:
On Aug 12, 2009, at 7:51 AM, Dmitry Markman wrote:
does ObjC initialize pointers to NULL?
No, it doesn't. It matches C in this respect.
It does for ivars though. So no need to set all instance variables to
nil, NULL, NO or 0 in your initialisers. You should be initialising
other pointers to something valid.
Jonathan
http://madebysofa.com
but in any way
I think it would be better to initialize retval to NULL:
NSString *retval = NULL;
Why? It's immediately and unconditionally followed by an
assignment. There's little reason to initialize the variable
directly above the assignment.
Regards,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden