Re: va_end() & [NSString initWithFormat:arguments:]
Re: va_end() & [NSString initWithFormat:arguments:]
- Subject: Re: va_end() & [NSString initWithFormat:arguments:]
- From: Ken Thomases <email@hidden>
- Date: Thu, 29 Apr 2010 21:49:50 -0500
On Apr 29, 2010, at 9:44 PM, Patrick M. Rutkowski wrote:
> Do I have to do a va_end() after using -[NSString initWithFormat:arguments:]?
If you call va_start(), you need to call va_end(). From the stdarg(3) man page:
"Note that each call to va_start() must be matched by a call to va_end(), from within the same function."
Note especially that last part. These aren't actually functions, they're macros. They can do funky things and the scope where they're invoked matters.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden